duplicateCard()
Description
Duplicates a card by the specified ID
Usage
duplicateCard({
id: string | number,
card?: object,
select?: boolean
}): void;
Parameters
id
- (required) the ID of the card to be duplicaredcard
- (optional) the data object of the new card. The full list of the card parameters can be found hereselect
- (optional) enables/disables selecting new added card
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// duplicate a card with the 1 ID
board.duplicateCard({
id: 1,
card: { label: "Duplicated card" },
select: true
});
Change log: The select
parameter was added in v1.5.10