-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close iOS Select when selection is made #403
Conversation
Without using the PanResponder if the user lingered on an option too long or let go while attempting to scroll the list the Picker would close. Now, we cancel the automatic close timeout if the user is still dragging in the Picker.
Actually, if you tap the field to close it before it autocloses, it will automatically open back up. |
With togglePicker and closePicker extracted into separate functions this now operates as I would expect and should be ready you @alvaromb! |
can you please give me an example of how this works? |
It implements the behavior requested by #265. This PR makes it so after tapping on an option the Select list closes itself automatically after 500ms. |
sorry if i was not too clear on what i was asking. I have a form with the below select so what attribute should I use/how do i make use of this? const SelectItems = t.enums({ SelectItems.getValidationErrorMessage = function () { |
I'm hoping this to get merged and released soon! Thanks |
Nice solution !! worked like a charm, thanks @zolrath ! |
Thank you so much man. It works perfectly. I have spent hours trying to fix the behaviour of the select component. But your code fixed everything. This should be already merged. |
Will merge this today, sorry for the delay. |
Sorry @zolrath, could you please solve conflicts? There have been some deep changes in that picker |
#507 also fixes this |
@Moreno97 can you solve the conflicts for this PR? |
@zolrath any chance to get this merged soon? |
@macrozone this PR has been open for so long and its something so important.. I think you should just fork the project and accept it yourself. Thats what I did, and its working great |
Landed in: #527 Sorry for the delay, I didn't have time to look into this since today. |
@alvaromb mentioned he'd take a pull request for this in #265
Currently, when presenting an enum in the form the default template provides a Picker on iOS.
This picker stays open after the user selects an option instead of automatically closing.
This pull request closes the picker 500ms after the user stops interacting with the Picker.
It detects pans on the View surrounding the Picker to ensure it doesn't close if the user is still panning the Picker after a selection is made, be it they are scrolling lower in the list or simply hovering over options.