react-ui-tree icon indicating copy to clipboard operation
react-ui-tree copied to clipboard

Send modified node info in the onChange callback

Open matiasgarcia opened this issue 10 years ago • 1 comments

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).

matiasgarcia avatar Oct 29 '15 15:10 matiasgarcia

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);

ghemingway avatar Jan 04 '16 19:01 ghemingway