Skip to main content

add-row

Description

Fires when adding a new row

Usage

"add-row": ({
id?: string | number,
row?: object,
before?: string | number,
skipProvider?: boolean
}) => 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
  • before - (optional) the ID of the row, before which the new row will be placed
  • skipProvider - (optional) enables/disables preventing the request from being sent to the server
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, before and row parameters were added in v1.1