end-drag-card
Description
Triggered when a card stops being dragged
Usage
"end-drag-card": ({
id: string | number,
columnId: string | number,
rowId?: string | number,
before?: string | number,
source?: array
}) => void;
Parameters
The callback for the end-drag-card event receives an object containing the following properties:
id- (required) the ID of the card that was draggedcolumnId- (required) the ID of the column where the card is now locatedrowId- (optional) the ID of the row where the card is currently placedbefore- (optional) the ID of the card that comes immediately after the dragged card in the columnsource- (optional) an array of IDs representing the moved cards
info
To manage internal events, the Event Bus methods can be used
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// listen for the "end-drag-card" event
board.api.on("end-drag-card", (obj) => {
console.log(obj.columnId);
});
Change log: This event was introduced in v1.4
Related sample: Kanban. Disabling drag and drop to specific columns