|
|
@@ -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
|
|