How to avoid autofill in TextField Component?
I tried all possible sollutions discussed on this question on StackOverflow. Nothing worked. Any idea how could I avoid this browsers' behavior?
I think most browsers use the name of input to figure out whether it should provide suggestions or not. If you just pass is unique generate name to the input, it should prevent autofill from occurring.
@newoga Thanks, It works fine right now. But when a form has multiple TextFields with unique names the autofill isn't disabled. Should be it expected?
This seems to have worked for me (we are using material ui with redux form)
<Textfield
inputProps={
{
autocomplete: "new-password",
form: {
autocomplete: "off",
}
}
/>
"new-password" works if the input is type="password "off" works if its a regular text field wrapped in a form