Skip to main content

api.intercept()

Description

Allows intercepting and preventing the inner events

Usage

api.intercept(
event: string,
callback: function
): void;

Parameters

  • event - (required) an event to be fired
  • callback - (required) a callback to be performed (the callback arguments will depend on the event to be fired)

Events

info

The full list of the Kanban internal events can be found here

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// forbid moving cards to the column with the "done" ID
board.api.intercept("move-card", ({ id, columnId }) => {
if(columnId! == "done" ){
return false;
}
});