Is it possible to catch taps on a React Native ScrollView while the keyboard is up? Or any React Native container for that matter?
I see the ScrollView property keyboardShouldPersistTaps and keyboardDismissMode that allows some control of how taps are handled while the keyboard is up. But no combination seems to allow taps to be handled normally.
The use case is a search field where the search is updated on keypress. When the entry appears in the list below the input, and the user taps it, I want the app to react to that tap. Right now it just dismissed the keyboard and the user has to tap again.
Looks like I answered my own question; setting keyboardShouldPersistTaps to 'always'
or 'handled'
on a ScrollView will pass taps to the components in that ScrollView even when the keyboard is up.
You need to add the keyboardShouldPersistTaps to 'always' on your list too.
Check out this answer:
https://stackoverflow.com/a/42815548/2887460
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With