Closed jumble closed 2 years ago
Hey, this is completely normal, if you have two instances of treeview with same data, because data are reactive, they will also share the same status (open / close - checked / unchecked etc...). I fixed your example to show how you can have two instances with same data. Of course, they will live separately !
Thank you for responding! What you have said about reactive data makes some sense, and in the provided example it is true that the maximization/minimization events are not duplicated across the trees.
However, selection events are still duplicated in your example. To replicate this behavior, fully unfold both trees, then attempt to select each item in turn, starting from the bottom. The first three selections (text2, text12, text11 from the lower tree) work correctly. The second three selections (text2, text12, text11 from the upper tree) will instead select the counterparts of those nodes from the lower tree.
Here is a GIF depicting behavior similar to that which I described above occurring in your provided sandbox.
I don't have much Vue experience, but would be happy to take a look at fixing this next week. Would that be helpful?
Heu, I have already made the fix, i'm fixing unit tests. It should be availabe next week :)
Should be fixed now :)
Yeah!! It is fixed. Thank you!!!
Maximization and minimization events are duplicated across all active trees. Can be replicated in the basic sandbox (https://codesandbox.io/s/basic-1g2jt) by duplicating the tree element defined on line 2 of App.vue.
Thanks for creating this, it's refreshingly minimal and functional.