moveCard()
Description
Moves a card to a specified column (and row)
Usage
moveCard({
id: string | number,
columnId: string | number,
rowId?: string | number,
before?: string | number
}): void;
Parameters
id- (required) the ID of the card to be movedcolumnId- (required) the ID of the column where the card will be placedrowId- (optional) the ID of the row where the card will be positionedbefore- (optional) the ID of the card before which the moved card will be inserted
info
If the rowKey property is set in the widget configuration, the rowId parameter in the moveCard() method must be provided.
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// move the card with ID 1
// it will be placed into the "inprogress" column and the "feature" row,
// before the card with ID 8
board.moveCard({
id: 1,
columnId: "inprogress",
rowId: "feature",
before: 8
});