[Help] select item Tree from a method instead of a click - hightLightSelectedNode

UI Components for Vue
Post Reply
Posts: 3
Joined: 15 Feb 2021, 15:28

29 Mar 2021, 17:10



Code: Select all

<Tree v-if="allStructuresTree.length > 0"
      style="padding:0px;width: 100%;display: flex;"
Is not working

Code: Select all

this.selectedKey2 = id;
Clear selection is not working because you can't set this object.

Code: Select all

this.$refs.tree.selectionKeys = {}
How can i hightLightSelectedNode from a method ?

For example:

Code: Select all

hightLightSelectedNode(node) {
this.$refs.tree. ????(node)

Code: Select all

this.$refs.tree.selectionKeys[this.$data.currentStructureItem.key] = false
      this.$data.currentStructureItem = itemInTree;
      this.$refs.tree.selectionKeys[itemInTree.key] = true
I have solved this by this way but i need to hightLightSelectedNode, how can i do it ?

p-treenode-content p-treenode-selectable p-highlight

and how can i get the element in the DOM without an id ?
not document.querySelector(".p-highlight");

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests