We want to disable autocomplete in Chrome browser in our React JavaScript application. We have tried bunch of solution available on the Internet but nothing wor
You can override chrome autofill by add onFocus
attribute.
render()
{
return
}
In the onFocus
method we need to change "autocomplete" attribute through javaScript.
onFocus = event => {
if(event.target.autocomplete)
{
event.target.autocomplete = "whatever";
}
};
This solution works for me.
let me know if it works for you ;)