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 of the new column, if specified
  • column - the data object for 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 allowed
info

To manage internal events, you can refer to 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: Starting from v1.1, the id, before, and column parameters were introduced