set-edit
Description
Triggered when the editor is toggled
Usage
"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void;
Parameters
The callback for the set-edit event can either be null or an object containing:
cardId- (required) the ID of the card being editedeventSource- (optional) the "select-card" action that triggers the set-edit event
note
The null value indicates that the editor is being closed
info
To manage internal events, you can utilize the Event Bus methods
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// block editing when a card is clicked once
board.api.intercept("set-edit", (ev) => {
return ev?.eventSource != "select-card";
});
Change log:
- The event was introduced in v1.2
- The eventSource parameter was added in v1.6
Related samples: Kanban. Open the editor by double-clicking on the task