amsik / liquor-tree

Tree component based on Vue.js
MIT License
398 stars 93 forks source link

Shift-Click select #101

Open severila opened 5 years ago

severila commented 5 years ago

Hi,

you currently support CTRL+Click for adding a node to the selection. I also need SHIFT+Click for selection which is a very common pattern.

The desired behaviour for shift-click is:

  1. If there is no node selected, select that node
  2. Keep track of the node that was last selected
  3. When shift-clicking on a node, select all elements between last selected node and the node that was selected
  4. If the last selected and newly selected node do not belong to the same parent node there are several options. Default should probably be to clear the previous selection and select the new node. Other option is to select all nodes in-between that are at the same depth or even including the parent nodes.

Since the node event currently does not emit the original mouse event I have no way of implementing this client-side.

Do you think thats possible to add?

amsik commented 5 years ago

Hi. Yes, it is possible to add. But I need some time for that

severila commented 5 years ago

Okay, great, thank you! Can you give me a rough estimate when you might find time for this? Just a range (is it couple of days or weeks or months)

severila commented 5 years ago

Hi, do you have any update on this? Or could you point me in the right direction to do it myself?