I have a use case where I want to hide the Picker after the user makes a selection. This is for iOS and I'm using Picker, not PickerIOS.
I can hide the Picker in the onValueChange but I feel like that's too "quick" for a nice user experience, i.e. the user might be scrolling in the Picker in iOS, stop on some value for a second and then continue scrolling. The onValueChange func gets called as soon as I stop on some value so the Picker would disappear right then and there even though the user actually meant to continue scrolling through the list.
So ideally I'd like to be able to hide the Picker 1 second after a selection or thereabouts provided that the user didn't start scrolling again.
How can I detect that the user is still touching/scrolling in the Picker or has stopped touching/scrolling it?
I've tried playing around with all the touch events that were available to me and also attempted wrapping the component in another View and playing around with onResponderX events without luck.
I have a use case where I want to hide the Picker after the user makes a selection. This is for iOS and I'm using
Picker
, notPickerIOS
.I can hide the Picker in the
onValueChange
but I feel like that's too "quick" for a nice user experience, i.e. the user might be scrolling in the Picker in iOS, stop on some value for a second and then continue scrolling. TheonValueChange
func gets called as soon as I stop on some value so the Picker would disappear right then and there even though the user actually meant to continue scrolling through the list.So ideally I'd like to be able to hide the Picker 1 second after a selection or thereabouts provided that the user didn't start scrolling again.
How can I detect that the user is still touching/scrolling in the Picker or has stopped touching/scrolling it?
I've tried playing around with all the touch events that were available to me and also attempted wrapping the component in another View and playing around with
onResponderX
events without luck.