Skip to main content

set-edit

Description

Fires when toggling an editor

Usage

"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void;

Parameters

The callback of the set-edit event can take the null value or an object with the following parameter:

  • cardId - (required) the ID of the card to be edited
  • eventSource - (optional) the "select-card" action that invokes the set-edit event
note

The null value is used when closing editor

info

For handling the inner events you can use the Event Bus methods

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// prevent editing when a user clicks the card once
board.api.intercept("set-edit", (ev) => {
return ev?.eventSource != "select-card";
});

Change log:

  • The event was added in v1.2
  • The eventSource parameter was added in v1.6

Related samples: Kanban. Open the editor by double-clicking on the task