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 movedcolumnId- (required) the ID of the column where the card will be placedrowId- (optional) the ID of the row where the card will be placedbefore- (optional) the ID of the card that the moved card will be placed beforeskipProvider- (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