Closed
Description
Get redo stack returns empty array:
- Steps to reproduce:
- Create a new task.
- Click on undo (This will delete the newly created task).
After this, here are two scenarios:
3.1 - Click on undo again (This creates a new task with the same name, instead of doing nothing).
3.2 - Click on redo (This does not add the deleted task, instead it does not do anything).
Implementation:
handleUndo() {
const undoStack = gantt.ext.undo.getUndoStack();
if (undoStack.length === 0) {
console.error('No more undo actions available');
return;
}
gantt.undo();
},
handleRedo() {
const redoStack = gantt.ext.undo.getRedoStack();
if (redoStack.length === 0) {
console.error('No more redo actions available');
return;
}
gantt.redo();
},
Metadata
Metadata
Assignees
Labels
No labels