Quantcast
Channel: Unfocus a TextInput in React Native - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by Ali El-Helbawi for Unfocus a TextInput in React Native

$
0
0

I used the below code and it worked perfect for me:i wrap all the view inside TouchableWithoutFeedback andonPress={() => {Keyboard.dismiss();}}

 import {View,TouchableWithoutFeedback,Keyboard,} from 'react-native'; ......<SafeAreaView><ScrollView nestedScrollEnabled={true}><TouchableWithoutFeedback      onPress={() => {Keyboard.dismiss();}}><View style={styles.container}>      {/* ..... */}</View></TouchableWithoutFeedback></ScrollView></SafeAreaView>

Viewing all articles
Browse latest Browse all 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>