hiddentao / react-native-modal-filter-picker

Cross-platform modal picker for React Native which supports keyword filtering, custom rendering, etc
MIT License
104 stars 74 forks source link

picker requires double tap, to open and to select a picker value #18

Open arkhamsushant opened 6 years ago

arkhamsushant commented 6 years ago

Hi hiddentao, I am using this component in my android app on production, it works fine, great work :). The issue I am facing is that the picker always requires double tap. Whether you need to open the picker, or you need to select a value, from the dropdown, we always need to tap twice, which makes it non-intuitive. It should work on single tap. Please inform if there is a solution to this or a workaround.

tobyhinloopen commented 6 years ago

The picker is only a visual element and does not handle taps - it only sends events (on a single tap) and you're expected to re-render the element with updated props.

kachnitel commented 5 years ago

@arkhamsushant Does the issue happen inside a ScrollView? If that's the case, you may just need to add keyboardShouldPersistTaps='handled' to the ScrollView, though I can't recall if that only caused the "double tap" when the keyboard was open.

arkhamsushant commented 5 years ago

Hi @kachnitel , keyboardShouldPersistTaps='handled' does not work. It still requires double tap, which make this very annoying to use. Please suggest, if you have some other workaround.

arkhamsushant commented 5 years ago

I found a solution to the problem. actually TextInput click was bringing up the keyboard on the background of the modal. So first click was always used for dismissing keyboard. By using Keyboard.dismiss() on the onFocus() method of TextInput, single tap started working.