duplicate-card
Description
Triggered when a card is duplicated
Usage
"duplicate-card": ({
id: string | number,
card?: object,
select?: boolean
}) => void;
Parameters
The callback for the duplicate-card event receives an object with these properties:
id
- (required) the ID of the card being duplicatedcard
- (optional) the data object for the new card. You can find the full list of card parameters hereselect
- (optional) controls whether the newly added card is selected 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 "duplicate-card" event
board.api.on("duplicate-card", (obj) => {
console.log(obj);
});
Change log: The select
parameter was introduced in v1.5.10