Bläddra i källkod

rn,invite: use custom clear button also on iOS

Otherwise it won't be visible if Dark Mode is enabled.
master
Saúl Ibarra Corretgé 5 år sedan
förälder
incheckning
c5e693f14a

+ 4
- 7
react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js Visa fil

@@ -201,7 +201,6 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
201 201
                             <TextInput
202 202
                                 autoCorrect = { false }
203 203
                                 autoFocus = { false }
204
-                                clearButtonMode = 'always' // iOS only
205 204
                                 onBlur = { this._onFocused(false) }
206 205
                                 onChangeText = { this._onTypeQuery }
207 206
                                 onFocus = { this._onFocused(true) }
@@ -211,7 +210,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
211 210
                                 ref = { this._setFieldRef }
212 211
                                 style = { styles.searchField }
213 212
                                 value = { this.state.fieldValue } />
214
-                            { this._renderAndroidClearButton() }
213
+                            { this._renderClearButton() }
215 214
                         </View>
216 215
                         { Boolean(inviteItems.length) && <View style = { styles.invitedList }>
217 216
                             <FlatList
@@ -461,14 +460,12 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
461 460
     _query: (string) => Promise<Array<Object>>;
462 461
 
463 462
     /**
464
-     * Renders a button to clear the text field on Android.
465
-     *
466
-     * NOTE: For the best platform experience we use the native solution on iOS.
463
+     * Renders a button to clear the text field.
467 464
      *
468 465
      * @returns {React#Element<*>}
469 466
      */
470
-    _renderAndroidClearButton() {
471
-        if (Platform.OS !== 'android' || !this.state.fieldValue.length) {
467
+    _renderClearButton() {
468
+        if (!this.state.fieldValue.length) {
472 469
             return null;
473 470
         }
474 471
 

Laddar…
Avbryt
Spara