0

I am trying to toggle the visibility of password type input in TextInput component. I've set up state variable for toggling secureTextEntry props. When I toggle the secureTextEntry props value from true to false, the keyboard suggestions start to appear on the keyboard. I don't want such behavior, as password needs to be private. Such implementation gives bad experience to users. What I want is to disable the keyboard suggestions whenever the secureTextEntry props is set to false so that use can see what they've typed in password field.

This issue is only on Android. I've not tested on iOS yet.

I've tried using 'autoCorrect', 'autoCompleteType', and 'textContentType' props in all possible variations but I am still not able to achieve the result.

Here is confirmed Snack repro.

Anil Rai
  • 104
  • 2
  • Solutions [here](https://stackoverflow.com/questions/37001070/how-to-avoid-the-suggestions-of-keyboard-for-android-in-react-native) seemed promising but I was unable to get anything working in your Snack with them. The `keyboardType={vis ? "default" : "visible-password"}` toggled the suggestions off but then I was unable to toggle the masked view back on. Seems to be some quirks with Android and/or Expo. – Drew Reese Feb 02 '21 at 08:36
  • I studied that post in detail. I also tried changing the Native Code, but still I was also not able to toggle back the masked view after the first toggle. Isn't Facebook app made from React Native as well ? Its working well while toggling the password visibility back and forth in Android. I wonder how they achieved such behavior. Is this still an issue that need to be resolved in future release ? or ? – Anil Rai Feb 02 '21 at 10:00

0 Answers0