Skip to main content

move-card

Description

Triggered when a card is moved

Usage

"move-card": ({
id: string | number,
columnId: string | number,
rowId?: string | number,
before?: string | number,
skipProvider?: boolean
}) => void;

Parameters

The callback for the move-card event receives an object with the following properties:

  • id - (required) the ID of the card being moved
  • columnId - (required) the ID of the column where the card will be placed
  • rowId - (optional) the ID of the row where the card will be placed
  • before - (optional) the ID of the card that the moved card will be placed before
  • skipProvider - (optional) controls whether the request to the server should be skipped or not
info

To work with internal events, you can use the Event Bus methods

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// listen for the "move-card" event
board.api.on("move-card", (obj) => {
console.log(obj.columnId);
});

Related sample: Kanban. Disabling drag and drop to specific columns