Skip to content
Discussion options

You must be logged in to vote

Hey, thanks for trying it out! 😃

Yeah, that's a use-case I forgot about when implementing it.

Should I set tree.nodes to the new table of TreeNodes and call tree:render()

I think you shouldn't do that and only use the public APIs documented in the documentation.

should I just create a whole new tree and let it overwrite the buffer?

You can do that for now.

But the real solution would be to add an API like tree:set_nodes(nodes) that takes a list and replaces all the nodes. That would be useful for this use-case, right?

what's the expected way to replace all the nodes in a tree with a new collection?

I just added the tree:set_nodes method, and that would be the recommended way of doin…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cseickel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants