picker icon indicating copy to clipboard operation
picker copied to clipboard

No way to detect when user has stopped scrolling in iOS

Open Jorundur opened this issue 3 years ago • 1 comments

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.

Jorundur avatar Apr 13 '22 12:04 Jorundur

same issue here with me as well, I cant detect if the user stopped on the desired value or just stopped and will start scrolling again

Faseeh-Abbas-Khan avatar Apr 18 '22 11:04 Faseeh-Abbas-Khan