Skip to main content

api.detach()

Description

This method lets you remove or detach an event listener.

Usage

api.detach(tag: number | string | symbol ): void;

Parameters

  • tag - the identifier used to reference an event handler when it was created

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});

board.api.on("move-card", ({ id, columnId }) => {
console.log("Move the card");
}, { tag: "move" });

board.api.detach("move");

Change log: The internal method was added in v1.7