Skip to main content

api.exec()

Description

This method lets you trigger internal events within the Kanban board.

Usage

api.exec(
event: string,
config: object
): void;

Parameters

  • event - (required) the event you want to trigger
  • config - (required) an object containing parameters related to the event being triggered

Events

info

You can find the complete list of Kanban internal events here

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// select the card with the 1 ID
board.api.exec("select-card", { id: 1 });
// add new card without sending changes to the server
board.api.exec("add-card", {
columnId: "backlog",
skipProvider: true,
});

Related sample: Kanban. Preserve sorting