You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-native: Expo SDK 36 (based on React Native 0.61.4)
Expected behaviour
Feature request: I would like the ability to either control when the Select component is open/closed, OR at least be able to prevent closing on value change (e.g. allow user to change values multiple times, or scroll long lists with pauses, without the Select automatically closing)
Actual behaviour
Whenever the value changes, the Select closes (at least on iOS). This might be ok for Selects with a small number of options, but for longer lists that require the user to scroll, it closes when they may just be pausing to move their finger or read the options that have been scrolled into view.
Steps to reproduce
Create an Enum with a relatively long list of options (say, letters of the alphabet).
Play around with scrolling through the options
Observe that if scroll motion ever stops, the Select will close, though you might not have the final value you want
I'm willing to do a PR for this. My question to the community: Should the solution be a simple boolean prop to prevent closing on value change (only close when the user taps again), or should Select take props for isCollapsed (which is partially does already) and onPress for making the Select component fully controllable?
The text was updated successfully, but these errors were encountered:
Version
Expected behaviour
Feature request: I would like the ability to either control when the Select component is open/closed, OR at least be able to prevent closing on value change (e.g. allow user to change values multiple times, or scroll long lists with pauses, without the Select automatically closing)
Actual behaviour
Whenever the value changes, the Select closes (at least on iOS). This might be ok for Selects with a small number of options, but for longer lists that require the user to scroll, it closes when they may just be pausing to move their finger or read the options that have been scrolled into view.
Steps to reproduce
Background & Key Discussion Point:
If you look at select.ios.js, togglePicker is called anytime the value changes. In the past, there was a PR to control toggle state via props, which was partially reverted due to an anti-pattern. There have been other related issues asking for this (such as Is it possible to programmatically collapse pickers? and Select Component auto closed after rolling end in ver 0.6.20), so a solution is definitely needed.
I'm willing to do a PR for this. My question to the community: Should the solution be a simple boolean prop to prevent closing on value change (only close when the user taps again), or should Select take props for
isCollapsed
(which is partially does already) andonPress
for making the Select component fully controllable?The text was updated successfully, but these errors were encountered: