Page COW
Page COW

Reputation: 755

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.

Upvotes: 0

Views: 1854

Answers (1)

Prabs
Prabs

Reputation: 58

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

Please remove it and try

Upvotes: 2

Related Questions