Row moves cannot be made permanent

Tags: #<Tag:0x00007f0b099413b0>

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 :frowning: - 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.

https://jsfiddle.net/c8r7pakt/

Hi @HC289

I think that we already started the following conversation here https://github.com/handsontable/handsontable/issues/7517. Am I wrong?

Oh gosh sorry, i checked the forum but didn’t search github - it’s still causing issues for me, i’ll continue this on the github ticket though - thanks