Undo (Ctrl/Cmd-Z) fires a groupAction w/setCellValue, but vals are the current (i.e. reverting) ones

Reqt is to be notified of any value changes across the sheet to re-serialize it to JSON, and this naturally includes any manual Undo.

Was surprised to find both afterAction and beforeAction seem to capture the reverting (i.e. previous) value, not the value we`re reverting to.

Example:

  • a cell has “Apple” and you paste “Banana” over it, then hit Ctrl-Z
  • afterAction and beforeAction both fire a groupAction on the Ctrl-Z
  • one of the properties of the groupAction is a setCellValue action (so far, so good)
  • the val of the action contains ["Banana"], even though the value is changing back to “Apple”
  • there’s no prev on the action

This isn’t the biggest deal because at least setCellValue is triggered on revert and that’s all I need to know. But it seems like a bug — unless I’m missing something, afterAction should tell me what it’s setting (back) to.