Skip to main content

addLink()

Description

Inserts a new link into the Kanban board

Usage

addLink({
id?: string | number,
link: object
}): void;

Parameters

  • id - (optional) the identifier for the new link
  • link - (required) the data object representing the new link. You can find the complete list of link parameters here

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// add new link
board.addLink({
id: 3,
link: {
source: 4,
target: 6,
relation: "relatesTo",
}
});

Change log: This method was introduced in version 1.5