So when a user drags an item and drops it under another parent, it will then make a callback to update the record in the database with the updated parentId. In the case that the save was not successful for some reason, I am trying to prevent the drag and drop, or reverse it, so the user is aware the drop didn't update the data. I will also display an error message letting the user know it was not successful.
Since the callback is asynchronous, the event that changes the grid seems to happen before the callback returns.
A possible solution I am thinking about is maybe refreshing the entire tree list with the current state of the database if the save fails.