Home > database >  TextInput secureTextEntry={true} is not working (React Native}
TextInput secureTextEntry={true} is not working (React Native}

Time:03-29

This is my code:

<TextInput
    style={styles.inputs}
    placeholder={'Password'}
    value={password}
    onChangeText={setPassword}
    multiline={true}
    textContentType="default"
    secureTextEntry={true}
/>

secureTextEntry={true} should be causing the text to turn into dots as the user is typing, but it shows the text. Am I doing something wrong? I want the password text to be hidden / turned into dots as the user is typing his password.

CodePudding user response:

secureTextEntry={true} won't work when multiline props is enabled (true). Check this https://reactnative.dev/docs/textinput#securetextentry

Please remove it and try

  • Related