start-drag-card
Description
Fires when start dragging a card
Usage
"start-drag-card": ({
id: string | number,
columnId: string | number,
rowId?: string | number,
before?: string | number,
source?: array
}) => void;
Parameters
The callback of the start-drag-card event can take an object with the following parameters:
id
- (required) the ID of the dragged cardcolumnId
- (required) the ID of the column where the card currently isrowId
- (optional) the ID of the row where the card currently isbefore
- (optional) the ID of a card that is currently after the dragged card in the columnsource
- (optional) the array of moved cards' IDs
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 "start-drag-card" event
board.api.on("start-drag-card", (obj) => {
console.log(obj.columnId);
});
Change log: The event was added in v1.4
Related sample: Kanban. Disabling drag and drop to specific columns