Here is my phone screen我试过ScrollView与keyboardShouldPersistTaps,但它没有奏效。我有一个用于自动填充建议的ScrollView,当用户可以在那里键入时,他也应该从建议中进行选择。但是,没有关闭键盘,在我的情况下是不可能的。这里是我的工作React Native,我无法点击没有关闭键盘
<ScrollView
scrollEnabled={false}
keyboardShouldPersistTaps={true}>
<View style={{ maxHeight: 220 }}>
<ScrollView style={Style.suggestionContainer}
scrollEnabled={true} >
{this.state.showOptions.map(this.renderSuggestions)}
</ScrollView>
</View>
</ScrollView>
.
.
.
private renderSuggestions(option: MultiInputQuestionOption) {
return (
<TouchableOpacity onPress={this.addSelection.bind(this, option)} >
<Text style={Style.suggestions}>
{option[this.props.titleKey]}
</Text>
</TouchableOpacity >
)
}
有什么可能的解决办法吗?
为什么你有两个滚动视图组件?尝试只用一个 – Raymond
这个bug有什么好运气? – nikasv