Michael Hsu
Michael Hsu

Reputation: 982

react native: double tap needed for ScrollView / FlatList / SectionList?

If I have data in a ScrollView, FlatList, or SectionList, and that data includes a button that the user can press on, tapping on the button once hides the Keyboard as expected:

onScroll={() => Keyboard.dismiss()}

but it does not trigger the button callback. It only works if you tap the same button a second time after the keyboard is hidden. Is there any way to fix this?

Upvotes: 1

Views: 2147

Answers (1)

Michael Hsu
Michael Hsu

Reputation: 982

I figured out the answer from the docs, setting keyboardShouldPersistTaps="always"

Upvotes: 6

Related Questions