I am using react with a bound [data, setData] setup. With manualRowMove={true}, when I move a row, the change is reflected in hotInstance.getData() but it is NOT reflected in the bound variable data
This is problematic for me, I’ve been dealing with it by calling setData in the afterRowMove callback. I’ve recently discovered this is wiping my Undo Stack - which is very problematic as you might imagine.
Here’s a fiddle demonstrating the issue, move a row then press ctrl+z and observe it doesn’t undo. The difference in hotInstance.getData() and data is shown in the console. I would expect data
to always equal instance.getData() - this seems inconsistent.
Is there a way to make row moves ‘permanent’ so that the data
var is updated? Or a way to ‘setData’ that doesn’t destroy my undo stack/instance? Maybe with a source or similar?
The problem with data and hotInstance.getData() being inconsistent is that eventually my table updates from the bound ‘data’ and to my users it looks like the rows they’ve moved are ‘unmoving’ themselves. I could try not using bound ‘data’ at all, but then I’d be using hotInstance.loadData()… which is what seems to be doing all the destroying.