holiber/sl-vue-tree

i wan edit a title after click

Closed this issue · 5 comments

i wan edit a title after click a node ,
example node 1 >>> node 2 rename

i solved this

this.$refs.slVueTree.insert({node:thisnode,placement: "inside"}, {title: "Dragged Item"});

how i can update a node

this.$refs.slVueTree.updateNode({node:thisnode}, {title: "changed Item"});

??

i sloved this by
this.$refs.slVueTree.updateNode(node.path, { ...node, title: 88888888});
then i need change id in data
this.$refs.slVueTree.updateNode(node.path,{ ...node.data, id: 999});
it not changed id !

You're not updating the data in your exaple

The correct way is

this.$refs.slVueTree.updateNode(node.path, {  data: {id: 999} });

thanks work fine