Skip to content

Commit

Permalink
Disable selecting empty values
Browse files Browse the repository at this point in the history
Empty value is prepended to Picker by library mainters in PickerModal.js to fix this issue: facebook/react-native#15556
  • Loading branch information
andrejcesen committed Nov 5, 2020
1 parent c030d8a commit 76cd88b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/withPickerValues/PickerModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class PickerModal extends PureComponent<PropsType> {
};

onValueChange = (value: any) => {
if (value === '') return;
if (this.props.onChangeText) this.props.onChangeText(value);
if (this.props.onSubmitEditing) this.props.onSubmitEditing();
if (this.props.onChangeCb) this.props.onChangeCb(value);
Expand Down

0 comments on commit 76cd88b

Please sign in to comment.