Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

rn,invite: use custom clear button also on iOS

Saúl Ibarra Corretgéc5e693f14ae1
diff --git a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
index fc7042fed2..32afa77d91 100644
--- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
+++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
@@ -201,7 +201,6 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
<TextInput
autoCorrect = { false }
autoFocus = { false }
- clearButtonMode = 'always' // iOS only
onBlur = { this._onFocused(false) }
onChangeText = { this._onTypeQuery }
onFocus = { this._onFocused(true) }
@@ -211,7 +210,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
ref = { this._setFieldRef }
style = { styles.searchField }
value = { this.state.fieldValue } />
- { this._renderAndroidClearButton() }
+ { this._renderClearButton() }
</View>
{ Boolean(inviteItems.length) && <View style = { styles.invitedList }>
<FlatList
@@ -461,14 +460,12 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
_query: (string) => Promise<Array<Object>>;
/**
- * Renders a button to clear the text field on Android.
- *
- * NOTE: For the best platform experience we use the native solution on iOS.
+ * Renders a button to clear the text field.
*
* @returns {React#Element<*>}
*/
- _renderAndroidClearButton() {
- if (Platform.OS !== 'android' || !this.state.fieldValue.length) {
+ _renderClearButton() {
+ if (!this.state.fieldValue.length) {
return null;
}