Open dioncodes opened 3 years ago
fill out full bug report
I have same problem :-(
fill out full bug report
What do you mean? I filled out the github issue bug template.
additional details aren't filled out
additional details aren't filled out
Sorry, I've added the missing version numbers of the additional details above.
Same problem here
Same problem to :/
I managed to find a temporary workaround until this is fixed:
value
prop from the <RNPickerSelect />
<RNPickerSelect ref={picker} ... />
) and set the initial value (using setState) at the beginning:
const picker = useRef<RNPickerSelect>(null);
useEffect(() => { picker.current?.setState({ selectedItem: { label: 'Example B', value: 1 } }); }, []);
Please note that the full item (including label) needs to be passed, not only the value.
Describe the bug
The select popup closes instantly when the state and selected value changes. If the
value
isn't changed, it will jump back to the specified option of thevalue
property .To Reproduce
Steps to reproduce the behavior:
Expected behavior
Select View should stay present until it is closed or "done" is tapped.
Screenshots
n/a
Additional details
Reproduction and/or code sample