I have a component that dismisses the keyboard. I then wrap my entire component with this one so whenever I tap outside of the TextInput the keyboard gets dismissed . But the problem is that in my other component I have a Flatlist and it does not scroll at all with TouchableWithoutFeedback. Any recommendations will be appreciated because I have not found a solution yet for hours! Thank you!
export const DismissKeyboard: React.FC<{
isKeyboardOpen?: boolean
style?: ViewStyle
}> = ({ children, style }) => (
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={style}>{children}</View>
</TouchableWithoutFeedback>
)
<DissmissKeyboard>
<FlatList
...flatlist data
/>
</DissmissKeyboard>
Wrap the FlatList renderItem component into a TouchableWithoutFeedback or a TouchableOpacity
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