ソースを参照

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年前
コミット
c5e693f14a

+ 4
- 7
react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js ファイルの表示

201
                             <TextInput
201
                             <TextInput
202
                                 autoCorrect = { false }
202
                                 autoCorrect = { false }
203
                                 autoFocus = { false }
203
                                 autoFocus = { false }
204
-                                clearButtonMode = 'always' // iOS only
205
                                 onBlur = { this._onFocused(false) }
204
                                 onBlur = { this._onFocused(false) }
206
                                 onChangeText = { this._onTypeQuery }
205
                                 onChangeText = { this._onTypeQuery }
207
                                 onFocus = { this._onFocused(true) }
206
                                 onFocus = { this._onFocused(true) }
211
                                 ref = { this._setFieldRef }
210
                                 ref = { this._setFieldRef }
212
                                 style = { styles.searchField }
211
                                 style = { styles.searchField }
213
                                 value = { this.state.fieldValue } />
212
                                 value = { this.state.fieldValue } />
214
-                            { this._renderAndroidClearButton() }
213
+                            { this._renderClearButton() }
215
                         </View>
214
                         </View>
216
                         { Boolean(inviteItems.length) && <View style = { styles.invitedList }>
215
                         { Boolean(inviteItems.length) && <View style = { styles.invitedList }>
217
                             <FlatList
216
                             <FlatList
461
     _query: (string) => Promise<Array<Object>>;
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
      * @returns {React#Element<*>}
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
             return null;
469
             return null;
473
         }
470
         }
474
 
471
 

読み込み中…
キャンセル
保存