Skip to content

Commit

Permalink
Disallow selection of the root node
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikVerheul committed Feb 2, 2024
1 parent ad498d5 commit 9183d66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/views/sl-vue-tree/sl-vue-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ const methods = {
},

onNodeMousedownHandler(event, node) {
// disallow selection of the root node
if (node.level === 1) return

if (!this.isRoot) {
this.getRootComponent().onNodeMousedownHandler(event, node)
return
Expand Down

0 comments on commit 9183d66

Please sign in to comment.