Skip to main content

duplicateCard()

Description

Creates a duplicate of a card based on the given ID

Usage

duplicateCard({
id: string | number,
card?: object,
select?: boolean
}): void;

Parameters

  • id - (required) the ID of the card to be duplicated
  • card - (optional) the data object for the new card. You can find the full list of card parameters here
  • select - (optional) determines whether the newly added card will 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 added in v1.5.10