vue-treeselect
vue-treeselect copied to clipboard
Expand parent nodes of selected item. Scroll menu to selected item.
If i have multilevel tree and v-model has an initial value (for example, from db), that lies deep on the tree, i cant see selected value, when open "treeselect". defaultExpandLevel open all nodes, its not suitable. lastScrollPosition doesnt work, when i open page first time. It has srollTop = 0. And i want open menu with selected item located in the center, not with "saveMenuScrollPosition" from the last time.
Second commit is about expand parents in search mode then children id selected.
I have this state (on screenshot). Then I input "AB" to the search area, tree expanded and I select "AB" item, then tree is collapsed and selected item is not visible. P.S. I dont need expand all levels by default.

Is there anything new about this feature and a possible release date?
nice PR!!! Thank you for the fix @varlamov88!
I tested this.expandParentNodes() should be in openMenu() like the follow:
if (this.scrollPositionOnCenter) {
// if in initialize(), when second open menu cannot scroll menu
// because $option = document.querySelector(".vue-treeselect__option--selected");
// will not initial then null
this.expandParentNodes();
this.$nextTick(this.scrollMenuOnCenter);
}
Have any question on this PR?
I also have this question need this PR, so whether consider to merge this right now if have no question else?
any news about merge this pr ?