delete-swimlane
PRO
The functionality is available in PRO Edition only
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;
};
| Field | Type | Description |
|---|---|---|
id | string | number | ID 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)} />
Related
- Swimlanes guide - lane setup and structural changes
- add-swimlane - create a lane
- move-swimlane - reorder lanes
- swimlanes - lane definitions
- GroupManager - panel that adds, renames, reorders, and deletes lanes