Undo does not work with auto save functionality

Tags: #<Tag:0x00007efc6264b328>

Hi,

when I implement autosave functionality using “afterChange” hook , the undo does not work, not able to undo the last changes.
Is there any way to undo the changes with autosave?

Thanks

Hi @kareerniti12

Can you please share a code demo with us? That way it will be easier to determine where the problem lies.

@adrian.szymanski - I wont be able to share the code demo for now, but through the code I am trying to save the this.getData() in the database through the API call, I am dumping the getData() in the database and updating the state in react

Hi @kareerniti12

Here’s Aleksandra. @adrian.szymanski is out of the office today.

Question: did you try to check what is saved in the afterChange and beforeUndo hooks? As I understand at the moment you use the autosave as a script that runs each time user makes changes to the table (via possibly the afterChange() hook)? If so, I do not see any possible impacts on the undo. Maybe you are calling some extra logic within those hooks. But as @adrian.szymanski mentioned the best way for us to specify what blocks your undo is the ability to debug the code where the issue is replicable.

Hi @kareerniti12 do we have any updates on the topic? Please let me know if something is still an issue.