Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent keyboard dismiss. React native

Tags:

react-native

How to keep keyboard opened when i have TextInput and Touchable near input that sends message. So i want to send message without double tap on touchable. First to hide keyboard, second to send message. How to do that?

like image 857
IC_ Avatar asked Aug 25 '17 14:08

IC_


1 Answers

Use keyboardShouldPersistTaps to handle this.

Example:-

<ScrollView
        keyboardDismissMode="on-drag"
        keyboardShouldPersistTaps={'always'} >
</ScrollView>

Deprecated Properties:-

false, deprecated, use 'never' instead

true, deprecated, use 'always' instead

source

like image 106
csath Avatar answered Sep 19 '22 04:09

csath