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 to insert nested nodes? #119

Closed
kermitmei opened this issue Aug 7, 2024 · 2 comments
Closed

How to insert nested nodes? #119

kermitmei opened this issue Aug 7, 2024 · 2 comments

Comments

@kermitmei
Copy link

Hello, thank you for developing such an excellent library. I have encountered some trouble while using it: I don't know how to insert multiple nested nodes at once, and after insertion, I hope to maintain the original expanded form. For example, the data shown in the code below.

addMulti() {
        // nested new nodes supported
        this.$refs.tree.addMulti(
          [{ text: 'addMulti1' }, { text: 'addMulti2', children: [{ text: 'addMulti1' }]}],
          this.$refs.tree.rootChildren[1],
          0
        )
      },

Thank you, very much!

@phphe
Copy link
Owner

phphe commented Aug 7, 2024

your code is right

@kermitmei
Copy link
Author

your code is right

thanks. it works!

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

2 participants