我有几个输入字段,它们使用扁平列表和表示每个输入的smartView逐个呈现,结构如下:
<View>
<Dialog>
<View >
<KeyboardAvoidingView>
<FlatList
renderItem={({ item }) => (
<SmartView //structure of view per input
<SafeAreaView>
<View>
<InputItem/>
<TouchableNativeFeedback/> //button that must be clicked
</View>
</SafeAreaView>
/>
)}>
</KeyboardAvoidingView>
</View>
</Dialog>
</View >类<InputItem/>包含有问题的<TextInput>,并且<TouchableNativeFeedback/>与<InputItem/>处于同一级别
我只需要注册的按钮,当键盘是显示点击,因为这个应用程序是在iPad上运行,键盘没有他们的任何方式。非常感谢
发布于 2021-05-05 16:01:54
通过向组件<Dialog>添加keyboardShouldPersistTaps={"always"}修复了此问题。
发布于 2021-04-26 19:27:12
将这个道具添加到你的FlatList中,这样即使键盘打开,触摸也会被检测到:keyboardShouldPersistTaps="handled"或keyboardShouldPersistTaps="always"
https://stackoverflow.com/questions/67265447
复制相似问题