pstanoev / simple-svelte-autocomplete

Simple Autocomplete / typeahead component for Svelte
http://simple-svelte-autocomplete.surge.sh/
MIT License
469 stars 79 forks source link

[#112] fixed late update of choice items #113

Closed nika-d closed 3 years ago

nika-d commented 3 years ago

The issue is fixed by a change in the order of handling changes reactively (first items, and then selectedItems).

This is a very small change to the control flow and only "local", because it affects only the case when simple-svelte-autocomplete is used with the items attribute and everything stay the same for the case of using searchFunction.

The fix solves problem in the minimal example, see this branch: https://github.com/nika-d/autocomplete-minimal-example/tree/fixing .

pstanoev commented 3 years ago

I can not see that this PR actually changes code besides the formatting. Please when submitting PRs to other repos try to keep the formatting as the other code in the repo.