Open Geoffrey-D opened 2 years ago
Hello, since vue js is based on data mutation for DOM manipulation (virutal DOM), i'm not sure having an ID for manipulation is relevant. Why did you put "data-node-id" instead of a real :id ? What is your use case ?
I need to open and focus nodes programatically, and as no "API" allowed such things, I had to:
Modifying the tree props to set all parents as "opened"
Manipulating the DOM to manage the "focus" state (by toggling classes).
I have added in this MR 2 API methods to do those things in an "API" object:
this.$refs.Tree.API.open(id);
this.$refs.Tree.API.focus(id);
I have also changed the "data-node-id" attr to "id" as it makes more sense
What do you think of those 2 features? Can we merge them?
Hey @N00ts could you please give a feedback on this?
Thx :)
Hey I had a look to your PR. I have multiple remarks.
This facilitate DOM manipulation :)