JosephusPaye / Keen-UI

A lightweight Vue.js UI library with a simple API, inspired by Google's Material Design.
https://josephuspaye.github.io/Keen-UI/
MIT License
4.1k stars 438 forks source link

UISelect: when using multiple & keys props list gets scrolled to top after select #437

Open plakak opened 5 years ago

plakak commented 5 years ago

After selecting an item when using multiple and keys props togheter, scroll always gets back to the top.

Steps:

  1. Open https://codesandbox.io/s/9422p2l53p
  2. Open select and scroll to some bottom item.
  3. Click to mark as selected.
  4. Scroll returns to the top.
JosephusPaye commented 5 years ago

Thanks for the report, can confirm.

Need to investigate more, but on cursory look, it seems like the filteredOptions computed property is recomputed when an option is selected, which causes the list's scroll to reset and return to the top.