SlickGrid icon indicating copy to clipboard operation
SlickGrid copied to clipboard

Problem with undo in CellExternalCopyManager

Open doornik opened this issue 2 years ago • 1 comments

In /plugins/slick.cellexternalcopymanager.ts (308) the undo function should ignore oneCellToMultiple.

Instead all values should be restored. The problem can be verified in the Spreadsheet: features of the previous example plus Excel compatible copy and paste example:

  1. copy a single value
  2. select a range
  3. paste the single value, which is applied to all selected cells as expected
  4. Ctrl+Z to undo goes wrong

Unfortunately the clipCommand binds to the oneCellToMultiple value of the parent, not of itself, so a quick hack of setting it to false is not possible.

For the purpose of separating the data in a DataView, I would prefer it if setDataItemValueForColumn would use desty as the first argument in the call to dataItemColumnValueSetter, rather than content of the current row in item. The current approach does not make the row known.

Thanks for a great grid.

doornik avatar Nov 17 '23 19:11 doornik

@doornik Please contribute a Pull Request since you seem to have the knowledge on how to fix the issue

ghiscoding avatar Jan 22 '24 15:01 ghiscoding