问题:选择动态填充列表中的输入框时,键盘会立即消失。仅当选择页面底部附近的输入框时才会发生。
发生在: Android上(适用于ios)
这个应用程序是用Expo创建的,我还没有弹出。
当前正在使用KeyboardAwareFlatlist,但是如果我切换到只使用FlatList,仍然会出现问题。下面是TextInput的代码。请让我知道,如果你想要任何其他代码。
<TextInput
style={{
color: 'black',
backgroundColor: 'white',
padding: 5,
fontSize: 16,
marginBottom: 10,
}}
keyboardType={'numeric'}
returnKeyType='done'
onChangeText={(text) => this.setDuration(text, index)}
value={item.duration.toString()}
/>发布视频:https://www.youtube.com/watch?v=U3Ps_tz4Uxw&feature=youtu.be
发布于 2020-08-01 08:01:40
所以我遇到了一个非常相似的东西,尽管它与FlatList没有任何关系。
我的解决方案是像这样添加removeClippedSubviews={false}:
<Input
id="description"
label="Description"
errorText="Enter a valid Description"
keyboardType="default"
removeClippedSubviews={false}
autoCorrect
multiline
type="text"
required
/>同样有效的是,尽管它看起来有点脏,但通过使用:
keyboardDismissMode='none'
如下所示:
<Input
id="title"
label="Title"
keyboardDismissMode='none'
errorText="Enter a valid title"
autoCapitalize="sentences"
keyboardType="default"
returnKeyType="next"
onInputChange={inputChangeHandler}
required
/>如果有效的话,请告诉我。希望你能及时得到这个答案。我讨厌未回答的堆栈溢出问题
发布于 2020-11-25 04:16:26
让你的外部“包装器”成为一个ScrollView。这应该可以解决这个问题。
`return (
<ScrollView>
// All your other code
</ScrollView>
);`https://stackoverflow.com/questions/57837844
复制相似问题