Skip to content

Commit

Permalink
Merge pull request #13 from bamlab/tpucci-patch-1
Browse files Browse the repository at this point in the history
fix(android): Fix Android picker initialization when value is undefined
  • Loading branch information
tpucci authored Apr 9, 2018
2 parents 3c92d1f + 8f83c19 commit 0b98f00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/withPickerValues/PickerModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class PickerModal extends PureComponent<PropsType> {
const values = [...this.props.values];
if (Platform.OS === 'ios') {
values.unshift({ value: '', label: placeholder });
} else {
// Fix for issue: https://github.com/facebook/react-native/issues/15556
values.push({ value: '', label: '' });
}
const picker = (
<Picker onValueChange={this.onValueChange} selectedValue={value} prompt={placeholder}>
Expand Down

0 comments on commit 0b98f00

Please sign in to comment.