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 movedcolumnId
- (required) the ID of the column the card will be placed intorowId
- (optional) the ID of the row the card will be placed intobefore
- (optional) the ID of the card, before which the new card will be placedskipProvider
- (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