Skip to main content

add-link

Description

Fires when adding a new link

Usage

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

Parameters

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

  • id - (optional) the ID of the new link
  • link - (required) the data object of the new link. The full list of the link parameters can be found here
  • 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,
links
});
// subscribe on the "add-link" event
board.api.on("add-link", (obj) => {
console.log(obj.link.masterId);
});

Change log: The event was added in v1.4