holiber / sl-vue-tree

Customizable draggable tree component for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Programmatically selecting prev/next in tree

Alex-Sokolov opened this issue · comments

Is it possible to move selection by code?

For example, assume that selected Image Block 3:

2018-06-19 11 52 21

If we call method up — selection moved to Image Block 2
If we call method down — selection moved to Text Block 4

Thanks!

That looks like a good proposal. However, it is not clear how up and down methods are going to work with multiple selections. So I'm going to figure out some more flexible solution.

@Alex-Sokolov you can use getPrevNode and getNextNode methods from v1.6.0. See example keyboardcontrols.html in the demo folder.