[AutoComplete] onChange being called when value is duplicated #30150
Labels
bug 🐛
Something doesn't work
component: autocomplete
This is the name of the generic UI component, not the React module!
Duplicates
Latest version
Current behavior 😯
According to the documentation:
However, it seems that when the value is a duplicate - the onChange hook is ran.
Expected behavior 🤔
onChange should not run, as the value has not changed?
Steps to reproduce 🕹
https://codesandbox.io/s/vibrant-surf-ztbsl
Steps:
Context 🔦
I would like to send my chip updates as tags to a RESTful API:
However, currently it will produce POST requests upon a duplicate item. I can of course, handle this in the backend - but as far as i can see in the docs it states onChange will fire when changed.
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: