Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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

Please remove it and try

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading