Reputation: 897
Please help me with my problem. I have a long list of items, so I'm using ScrollView. But also I have Input field and using TouchableWithoutFeedback to make OnPress event to dismiss the keyboard, like that -
return (
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View >
<HeaderMain/>
<ScrollView >
...
</ScrollView>
</View>
</TouchableWithoutFeedback>
And my problem is that scrolling doesn't work. What should I do to make scrolling and dismissing keyboard both work correctly?
Upvotes: 2
Views: 1368
Reputation: 359
I think you should be using keyboardShouldPersistTaps
and/or keyboardDismissMode
props from ScrollView.
You can read more about that in the docs: https://facebook.github.io/react-native/docs/scrollview.html
Upvotes: 2