eufemia icon indicating copy to clipboard operation
eufemia copied to clipboard

Autocomplete: Incorrect items shown as selected after async update of data

Open dagerikhl opened this issue 2 years ago • 4 comments

🐛 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.

dagerikhl avatar May 16 '22 13:05 dagerikhl