eufemia
eufemia copied to clipboard
Autocomplete: Incorrect items shown as selected after async update of data
🐛 Bug Report
As I didn't receive a response on Slack, I'll try reporting it here instead :)
When filtering the list, then selecting one of the filtered items, the incorrect input value is shown in the Autocomplete input (shows the item corresponding to the same index in the unfiltered list as was clicked in the filtered list), even though the state and value property is updated correctly.
To Reproduce
I wrote reproduction steps in the CodeSandbox.
https://codesandbox.io/s/busy-cohen-bgjtd3
Expected behavior
I expect the indicated selected item to be the one actually chosen in the state, and not the item with the same index as the selected item had in the filtered list.
Run npx envinfo
See CodeSandbox for env.
Eufemia Version
Various projects experience this, from at least v9.11+ and up to v9.26.