redo
PRO
The functionality is available in PRO Edition only
Re-applies the last undone change. Requires history={true} on the <Kanban> component. If the redo stack is empty or history isn't enabled, the action is a no-op. Before restoring, it pushes the current card state onto the undo stack.
Any new card change (add-card, update-card, move-card, duplicate-card, delete-card) pushes a new history entry and clears the redo stack. A successful structural column or swimlane action (add, delete, or move) resets both the undo and redo stacks.
Usage
type RedoPayload = Record<string, never>;
Empty payload. No fields required.
Trigger
api.exec("redo", {});
Observe
api.on("redo", () => {
console.log("Redo applied");
});
Intercept
api.intercept("redo", () => {
// Cancel redo under certain conditions
if (locked) return false;
});
Component handler
<Kanban :cards="cards" :columns="columns" history :onredo="() => console.log('redo')" />
Related
- Undo and redo guide - enabling history and toolbar integration
- undo - revert the last card mutation
- history - enables undo/redo snapshots