You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The node that you get inside the event, cannot be used in addNode operation since the result of which fails to render or make actual changes on the tree.
Locally I have made a work around, that allows you to get the real node using nodeId that you can retrieve from the event.
Just realized that there may be a better solution, inside addnode function, it may be best to get parentNode by id that is being passed in node parameter. That way no matter if the node is real or deep-copied, it always gets the version of the node that belongs to the tree.
This is the same issue of #60. I found a way to work around the problem without changing the library. (Same idea as yours but don't have to change the lib. And yeah, it's better to solve the problem at lib level.)
This example does not work, because node being passed in event is deep copy (and is no longer a part of a tree).
The node that you get inside the event, cannot be used in addNode operation since the result of which fails to render or make actual changes on the tree.
Locally I have made a work around, that allows you to get the real node using nodeId that you can retrieve from the event.
Changes in the treeview.js
The text was updated successfully, but these errors were encountered: