https://primefaces.org/primevue/showcase/#/tree
Code: Select all
<Tree v-if="allStructuresTree.length > 0"
style="padding:0px;width: 100%;display: flex;"
filterMode="strict"
:value="allStructuresTree"
:loading="loadingPrime"
ref="tree"
selectionMode="single"
v-model:selectionKeys="selectedKey2"
:metaKeySelection="true"
@nodeSelect="onCurrentNodeChanged"
>
Code: Select all
this.selectedKey2 = id;
Code: Select all
this.$refs.tree.selectionKeys = {}
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
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");