dependent-tan
dependent-tan5mo ago

Web browser autocomplete not trigger form update

I had a form like this but when the user uses the web browser autocomplete function, data inside the form is not updated. How to force to update?
2 Replies
kapa.ai
kapa.ai5mo ago
Hi @Sebastos. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Web browsers have built-in heuristics to assist users in filling out form inputs, which can sometimes interfere with the component's UX. If you're using the Material UI Autocomplete component, you can disable the browser's autocomplete feature by setting the autoComplete="off" attribute. This will prevent the browser from remembering what the user wrote for a specific field in a previous session. If you want to avoid autofill suggestions (saved login, address, or username), you can try the following: 1. Name the input without revealing any information that the browser can utilize. For example, use id="field1" instead of id="country". If you leave the id field empty, the component generates a random id. 2. Set autoComplete="new-password". Some browsers will recommend a secure password for inputs with this attribute set. Here's an example:
<Autocomplete
id="field1"
autoComplete="off"
// other props...
/>
<Autocomplete
id="field1"
autoComplete="off"
// other props...
/>
Please note that these are general suggestions and the actual implementation may vary depending on your specific use case and the libraries you're using. For more information, you can refer to this guide on Material UI Autocomplete (https://refine.dev/blog/material-ui-autocomplete-component#autocompleteautofill) in React. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@689846866837373077> kapa.ai is still learning and improving, please let us know how it did by reacting below