Skip to main content

delete-swimlane

The functionality is available in PRO Edition only

PRO

Removes a swimlane by id. Only the lane configuration goes away. The action never moves or deletes cards. Cards from the deleted lane stay in the source data and in getCards(), but no longer show on the board. Deleting the last lane turns lane grouping off, so the board renders as an ordinary column board. An unknown id is a no-op.

A successful delete resets the undo/redo history. Cards, columnData, and editorData aren't changed.

When lanes are inferred (no swimlanes prop), the next card or accessor change rebuilds the lane list from card values. The deleted lane can come back. Pass an explicit swimlanes array to keep the change.

Usage​

type DeleteSwimlanePayload = {
id: SwimlaneID;
};
FieldTypeDescription
idstring | numberID of the lane to remove

Trigger​

api.exec("delete-swimlane", { id: "platform" });

Observe​

api.on("delete-swimlane", ({ id }) => {
console.log("swimlane deleted:", id);
});

Intercept​

api.intercept("delete-swimlane", ({ id }) => {
return confirm("Delete this swimlane?");
});

Returning false cancels the deletion.

Component handler​

<Kanban onDeleteSwimlane={({ id }) => console.log("deleted", id)} />