Whenever I make changes to my data in the table, it reverts to previous data after I click on a button. It means that my table data changes to original after every render. I want to retain my new data and stop it from being changing again to previous data. Here is a demo of the issue:
Table data reverts to previous data after clicking on a button
There are two different buttons and when I click any button it changes to previous data. It also changes to previous data when I click on Column Header, but id doesn’t change back when I click on row header. There are two buttons, one for downloading the table data, another for sending data to a backend REST API.
So as I assume the Save
button is the one that downloads the data (possibly by calling getData
or getSourceData
), right? In Hadsontable getters do not trigger any changes in the dataset so there has to be some other logic connected to the button or any other hook that you use.
Would you be able to share the logic of that button and logic within your hooks?
It reverts to previous data even if there no logic behind the button clicked, it’s just a button with console.log, the data still reverts. Below is my handsontable logic
Thank you for screenshots, @zabeehmayar18
Do you use any state management in your application? If not, I think that the best way to replicate that issue would be to be able to debug it. For that, I would require an online version of a replicable issue. We usually use codesandbox or JSFiddle to run the examples as it is easy to debug and send a fork with a working solution.