Skip to main content

add-link

Description

Triggered when a new link is added

Usage

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

Parameters

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

  • id - (optional) the ID assigned to the new link
  • link - (required) the data object representing the new link. You can find the full list of link parameters here
  • skipProvider - (optional) controls whether the request to the server is prevented or not
info

To manage internal events, you can make use of 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: This event was introduced in v1.4