[英]Javascript alert not working in android react-native webview
[英]Alert prompt (Alert with input value update) not working in android using react-native (Working in iOS)
我正在使用 Alert.prompt 更新 react-native 应用程序中的文本字段。 但它没有在 android 应用程序中打开警报。
在 iOS 应用程序警报中,输入框更新工作正常。
onEditText = (field) => {
Alert.prompt('Change ' + field + ':', this.props[field], (value) =>
this.props.setProfileField(field, value),
);
}
我认为使用 react-native 的 Alert 提示 Android 并没有真正起作用,您的替代方法是:
https://github.com/shimohq/react-native-prompt-android
这是一个原生替代方案,对于 JS 替代方案,将有:
https://github.com/mmazzarolo/react-native-dialog
https://www.npmjs.com/package/react-native-prompt-crossplatform
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.