Skip to main content

api.detach()

Description

Allows removing/detaching an event listener

Usage

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

Parameters

  • tag - the tag used to identify an event handler during its creation

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