Quantcast
Channel: blur by tapping outside of it, doesn't work in react native - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Pritish Vaidya for blur by tapping outside of it, doesn't work in react native

$
0
0

You need to pass your dimensions / flex of the parent container to the TouchableWithoutFeedbackin order for it work.

Assuming that you have flex: 1 in your styles.container, add

<TouchableWithoutFeedback style={{flex: 1}} onPress={Keyboard.dismiss} accessible={false}>

to your child component in order for it to inherit the flex.


Viewing all articles
Browse latest Browse all 2

Trending Articles



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