add-link
Description
Fires when adding a new link
Usage
"add-link": ({
id?: string | number,
link: object,
}) => void;
Parameters
The callback of the add-link event can take an object with the following parameters:
id
- (optional) the ID of the new linklink
- (required) the data object of the new link. The full list of the link 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,
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