riophae / vue-treeselect

A multi-select component with nested options support for Vue.js
https://vue-treeselect.js.org/
MIT License
2.91k stars 509 forks source link

In a nested list, searching for a child item and pressing ENTER selects the parent #445

Open wildhart opened 3 years ago

wildhart commented 3 years ago

Try it here: https://vue-treeselect.js.org/#basic-features Search for Apple: image Press Enter, "Fruits" is selected: image

I think a better approach would be to automatically highlight the first MATCHING item (apple), instead of just the first item (fruits), so that pressing Enter selects a matching item.

chriscfoster commented 3 years ago

Have you tried :autoSelectDescendants="true" ? although that may introduce a different issue, I wondered if that would fix this

wildhart commented 3 years ago

Hi @chriscfoster, thanks for your interest.

I tried that here, doesn't help: https://codepen.io/wildhart/pen/mdOvMbz

autoSelectDescendants only effects the behaviour when selecting a parent in flat mode. This bug is different: image