Update sort order of items after drop
Closed this issue · 3 comments
I'm trying to automatically update the sort order of the items after a node has been dropped, and the only way I'm able to achieve this is to re-render the component using a key and this.renderKey = new Date().getTime();
.
This, however resets all state of the component which is something I would like to avoid (keep current open state of all nodes).
Do you have any ideas on how to solve this?
try store every node's stat by Map, then use statHandler to set the stat for each node before each stat be created. https://hetree.phphe.com/v2/api#stathandler
try store every node's stat by Map, then use statHandler to set the stat for each node before each stat be created. https://hetree.phphe.com/v2/api#stathandler
I will give this a try, thank you!
This worked perfectly, thank you for the suggestion and for a great package!