【问题标题】:Disable "Save Password" Dialog in React Native在 React Native 中禁用“保存密码”对话框
【发布时间】:2019-05-28 19:06:20
【问题描述】:

我使用带有secureTextEntry 标志的TextInput 来允许用户输入他们的密码。当我运行tryLogin() 函数时,无论密码是否正确,iOS 都会询问用户是否要“记住浏览器上的密码”(类似于 Safari 的做法)。

有没有办法在 React Native 中禁用该对话框?

【问题讨论】:

  • 你能分享你TextInput的代码吗?
  • 是的,对不起,我太笨了:<TextInput autoCapitalize="none" placeholderTextColor={appColors.lightGray} style={styles.input} autoCorrect={false} placeholder="Password" secureTextEntry={true} keyboardType="email-address" ref = {component => this.inputs.LIPass = component} returnKeyType="done" value={this.state.loginPass} textContentType="none" onChangeText={(pass) => this.setState({loginPass: pass})} />

标签: javascript ios react-native jsx


【解决方案1】:

我认为您需要配置 textContentType 这是参考链接:https://facebook.github.io/react-native/docs/textinput#textcontenttype

希望得到帮助:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-06
    • 2020-03-21
    • 1970-01-01
    • 1970-01-01
    • 2016-08-06
    • 2016-11-30
    • 1970-01-01
    相关资源
    最近更新 更多