Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i update a specific tree node? #46

Open
manyasone opened this issue Feb 26, 2021 · 4 comments
Open

How can i update a specific tree node? #46

manyasone opened this issue Feb 26, 2021 · 4 comments

Comments

@manyasone
Copy link

Hi,
first of all, thanks for this nice component!

I'm wondering if I can update tree node data directly without having to reload the entire tree.
For example change the title of a node in a given path, after receiving data from an http request.

Is this possible with any of the available api methods? I've been trying for a while now, but without any success.

@phphe
Copy link
Owner

phphe commented Feb 27, 2021

change node data directly

@ZakTekHost
Copy link

Hey I have the same question, however my problem is when trying to obtain the node using getNodeByPath method, it says this method is undefined, so how exactly do I call it?
I am using this.treeData.getNodeByPath(Path);

@phphe
Copy link
Owner

phphe commented Feb 8, 2022

Hey I have the same question, however my problem is when trying to obtain the node using getNodeByPath method, it says this method is undefined, so how exactly do I call it? I am using this.treeData.getNodeByPath(Path);

<template>
<Tree ref="tree"/>
</template>

<script>
export default {
  methods: {
    yourMethod() {
      this.$refs.tree.getNodeByPath(your path)
    }
  }
}
</script>

@ZakTekHost
Copy link

Hey I have the same question, however my problem is when trying to obtain the node using getNodeByPath method, it says this method is undefined, so how exactly do I call it? I am using this.treeData.getNodeByPath(Path);

<template>
<Tree ref="tree"/>
</template>

<script>
export default {
  methods: {
    yourMethod() {
      this.$refs.tree.getNodeByPath(your path)
    }
  }
}
</script>

Thanks Ill Try It

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants