holiber / sl-vue-tree

Customizable draggable tree component for Vue.js
MIT License
344 stars 79 forks source link

Context menu not related to clicked item #67

Closed shealavington closed 4 years ago

shealavington commented 4 years ago

It appears that the context menu is only acting upon the last/selected item. I would expect the behaviour to act upon the node that I have selected.

shealavington commented 4 years ago

Answer found in an older issue, sorry for double issueing!

      showContextMenu(node, event) {
        this.$refs.slVueTree.select(node.path); // <-- add this line to select current node
      },