Skip to main content

add-column

Description

Triggered when a new column is added

Usage

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

Parameters

The callback for the add-column event receives an object with these optional properties:

  • id - the ID assigned to the new column
  • column - the data object representing the new column. You can find the complete list of column parameters here
  • before - the ID of the column before which the new column will be inserted
  • skipProvider - controls whether the request to the server is prevented or not
info

To work with internal events, you can use the Event Bus methods

Example

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

Change log: The id, before, and column parameters were introduced in v1.1