Skip to content

Commit 5459ab2

Browse files
committed
fix issue with native Picker not selecting value after first select
1 parent 29830e5 commit 5459ab2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/picker/NativePicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class NativePicker extends BaseComponent {
2828

2929
onDone = () => {
3030
const {selectedValue, items} = this.state;
31-
_.invoke(this.props, 'onChange', selectedValue || items ? items[0].value : undefined);
31+
_.invoke(this.props, 'onChange', _.isUndefined(selectedValue) ? _.get(items, '[0].value') : selectedValue);
3232
this.input.toggleExpandableModal(false);
3333
};
3434

0 commit comments

Comments
 (0)