Skip to main content

move-card

Description

Fires when moving a card

Usage

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

Parameters

The callback of the move-card event can take an object with the following parameters:

  • id - (required) the ID of the card that will be moved
  • columnId - (required) the ID of the column the card will be placed into
  • rowId - (optional) the ID of the row the card will be placed into
  • before - (optional) the ID of the card, before which the new card will be placed
  • skipProvider - (optional) enables/disables preventing the request from being sent to the server
info

For handling the inner events you can use the Event Bus methods

Example

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

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