React Native - Select row on ListView when keyboard is open

前端 未结 1 1135
傲寒
傲寒 2021-01-18 17:40


I\'m building a React Native app that has a view that contains TextInput and ListView.
The way it works is when the TextInput receives

相关标签:
1条回答
  • 2021-01-18 18:27

    You need to add the property keyboardShouldPersistTaps={always} to your ScrollView.

    Here is what the docs say :

    keyboardShouldPersistTaps

    Determines when the keyboard should stay visible after a tap.

    'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.

    'always', the keyboard will not dismiss automatically, and the scroll view will > not catch taps, but children of the scroll view can catch taps.

    'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).

    false, deprecated, use 'never' instead

    true, deprecated, use 'always' instead

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题