duplicateCard()
Description
Creates a copy of a card using its specified ID.
Usage
duplicateCard({
id: string | number,
card?: object,
select?: boolean
}): void;
Parameters
id- (required) the ID of the card to be duplicatedcard- (optional) the data object for the new card. You can find the full list of card parameters hereselect- (optional) determines whether the newly added card should be selected
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 introduced in v1.5.10