Skip to content


Browse files Browse the repository at this point in the history
fix setNativeSelectedPosition native command
telling native that `selected` is the new selection is basically ignoring the most recent user input and resetting it back to the previous value. the reason it flips back and forth is that by the next time `onSelect` is called, the above code has updated the value of `selected` (line 63)

[Android] [Fixed] Picker - fix usage of setNativeSelectedPosition in onSelect

Reviewed By: mdvacca

Differential Revision: D22022456

fbshipit-source-id: fe51f9cbd712b5578e9fd9ea2992bd12d48f4ec4
  • Loading branch information
Eddie Dugan authored and facebook-github-bot committed Jun 12, 2020
1 parent 8dce59c commit 078e386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Components/Picker/
Expand Up @@ -100,7 +100,7 @@ function PickerAndroid(props: Props): React.Node {
props.mode === 'dropdown'
? AndroidDropdownPickerCommands
: AndroidDialogPickerCommands;
Commands.setNativeSelectedPosition(current, selected);
Commands.setNativeSelectedPosition(current, position);
Expand Down

0 comments on commit 078e386

Please sign in to comment.