Skip to main content

add-column

Description

Fires when adding a new column

Usage

"add-column": ({
id?: string | number,
column?: object
}) => void;

Parameters

The callback of the add-column event can take an object with the following parameters:

  • id - (optional) the new column ID
  • column - (optional) the data object of the new column. The full list of the column parameters can be found here
info

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

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// subscribe on the "add-column" event
board.api.on("add-column", (obj) => {
console.log(obj.label);
});

Change log: The id and column parameters were added in v1.1