react-ui-tree
react-ui-tree copied to clipboard
Send modified node info in the onChange callback
I found that only having the modified tree on the onChange callback it wasn't enough for me since I had to know which node (or object) was modified and who is his father, so I added it.
I think this is particularly useful if you have to do some checks on the modified tree or something else (in my case, each time a node is modified I have to do an AJAX request to update the node position and parent).
I am running into a similar problem, but a slightly different need. I want to know when nodes have been collapsed or expanded. Using the onChange method is great, but I would like line 238 of this pull request to go from this:
this.change(tree, null, null);
to this:
this.change(tree, null, node);