Skip to main content

undo

PRO

The functionality is available in PRO Edition only

Reverts the board to the state before the last mutating action. Requires history={true} on the <Kanban> component. Does nothing when the undo stack is empty or history is disabled.

Mutating actions that push history snapshots: add-card, update-card, move-card, duplicate-card, delete-card.

Usage

type UndoPayload = {};

Empty payload - no parameters needed.

Trigger

api.exec("undo", {});

Observe

api.on("undo", () => {
console.log("undo applied");
});

Intercept

api.intercept("undo", () => {
// return false to prevent undo
return true;
});

Component handler

<Kanban :cards="cards" :columns="columns" history :onundo="() => console.log('undone')" />