Skip to content

Commit 8f83c19

Browse files
authored
fix(android): Fix Android picker initialization when value is undefined
1 parent 3c92d1f commit 8f83c19

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/withPickerValues/PickerModal.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class PickerModal extends PureComponent<PropsType> {
2828
const values = [...this.props.values];
2929
if (Platform.OS === 'ios') {
3030
values.unshift({ value: '', label: placeholder });
31+
} else {
32+
// Fix for issue: https://github.com/facebook/react-native/issues/15556
33+
values.push({ value: '', label: '' });
3134
}
3235
const picker = (
3336
<Picker onValueChange={this.onValueChange} selectedValue={value} prompt={placeholder}>

0 commit comments

Comments
 (0)