|
const valueChange = value !== prevValue.current; |
Sometimes the value is an array (When autocomplete is multiple), So if after render the value does not referentially the same, the autocomplete will fire reset event.
For example
<Autocomplete value={values.filter(x => isSelected(x.value))}
The Bug/question is, shouldn't we check if the reference is the same for each item in case of multiple?
Thanks
material-ui/packages/mui-base/src/AutocompleteUnstyled/useAutocomplete.js
Line 199 in 3f8c1a4
Sometimes the value is an array (When autocomplete is multiple), So if after render the value does not referentially the same, the autocomplete will fire reset event.
For example
The Bug/question is, shouldn't we check if the reference is the same for each item in case of multiple?
Thanks