When does isUndoAvailable() set?

Tags: #<Tag:0x00007f8b1ad86088>

I have some undo/redo buttons that I wish to disable/enable based on isUndoAvailable() and isRedoAvailable()

isUndoAvailable() and isRedoAvailable() do not seem to be set during afterChange - for example if I make an edit then isUndoAvailable is still false during execution of afterChange.

If i validate the cell at the end of afterChange the state of isUndoAvailable() is correct in afterValidate.

So in the lifecycle of a data change, when is isUndoAvailable set?

Hey @trevorhartnz

You might find it easier to switch on/off the undoRedo plugin via updateSettings method. That way you’ll be sure that the user doesn’t stack the change to undo() it.