Skip to content

Commit 0b98f00

Browse files
authored
Merge pull request #13 from bamlab/tpucci-patch-1
fix(android): Fix Android picker initialization when value is undefined
2 parents 3c92d1f + 8f83c19 commit 0b98f00

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)