Skip to main content

add-row

Description

Fires when adding a new row

Usage

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

Parameters

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

  • id - (optional) the ID of the new row
  • row - (optional) the data object of the new row. The full list of the row 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-row" event
board.api.on("add-row", (obj) => {
console.log(obj.id);
});

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