如何解决我的应用程序中的 TextInput 使我的键盘永久滞后
我的 react-native 应用程序的 TextInput 使我的手机键盘即使在我关闭应用程序时也很迟钝。它正常工作,直到我尝试快速键入,它导致我的键盘缓慢和滞后。更糟糕的是,即使应用程序没有运行或在我清除应用程序的缓存后,我的键盘也会永久变慢。使其正常的唯一方法是重新启动手机。是bug吗?
<Portal>
<Dialog visible={props.visible} ondismiss={hideDialog} style={{ backgroundColor: 'white',borderRadius: 10 }}>
<Dialog.Title style={{ borderBottomWidth: 1,borderBottomColor: 'grey' }}>Report</Dialog.Title>
<Dialog.Content>
<TextInput
maxLength={500}
numberOfLines={10}
multiline={true}
autoFocus={true}
theme={ReportDialogTheme}
mode="outlined"
label="Reason"
placeholder="Reason for reporting"
value={inputReason}
onChangeText={text => setInputReason(text)}
selectionColor={THEME_SECONDARY}
/>
</Dialog.Content>
<Dialog.Actions style={{ backgroundColor: THEME_PRIMARY,borderBottomLefTradius: 10,borderBottomrighTradius: 10 }}>
<Button onPress={hideDialog} mode='text' color="white">Cancel</Button>
<Button onPress={report} mode='text' color="white">Submit</Button>
</Dialog.Actions>
</Dialog>
</Portal>
TextInput 是从 react-native-paper 导入的
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。