Select View Closes When Value Changes
See original GitHub issueDescribe 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 the value
property .
To Reproduce
Steps to reproduce the behavior:
- Tap select
- Scroll to a different option (iOS)
- Select View disappears
Expected behavior
Select View should stay present until it is closed or “done” is tapped.
Screenshots
n/a
Additional details
- Device: Simulator (iPhone 11, 12 Pro, etc.)
- OS: iOS 14.3
- react-native-picker-select version: 8.0.4
- react-native version: 0.63.4
- expo sdk version: n/a
Reproduction and/or code sample
<RNPickerSelect
onValueChange={(value: number) => {
setSelectedValue(value);
}}
items={[
{ label: 'Test A', value: 0 },
{ label: 'Test B', value: 1 },
{ label: 'Test C', value: 2 },
]}
value={selectedValue}
/>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Is there a way to prevent a select menu from closing if the ...
The problem with using the click event is that I need to change the value dynamically when the ajax request finish to make...
Read more >Retrieve records when value in column changes [closed]
I would like to get records when the Name changes (see column result). I' m not getting with this code. SELECT [Date], [Name]...
Read more >Automating actions when a property value changes
On the Actions tab, for Actions type, select Standard. Click Create an action set to add an action set to the field. Click...
Read more >Apply a filter to view select records in an Access database
Since the view you get after you apply a filter contains only records with the values that you selected, the rest of the...
Read more >View/Edit Data — pgAdmin 4 6.18 documentation
The lower panel (the Data Grid) displays the data selected from the table or ... To change a non-numeric value within the grid,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:Please note that the full item (including label) needs to be passed, not only the value.
Same problem to 😕