Skip to main content

updateColumn()

Description

Updates the column data by its ID

Usage

updateColumn({
id: string | number,
column?: object,
replace?: boolean
}): void;

Parameters

  • id - (required) the ID of the column to be updated

  • column - (optional) the new data object of the column. The full list of the column parameters can be found here

  • replace - (optional) enables/disables fully data replacing

    note

    If you set the replace parameter to true, the old data will be fully replaced by the new ones. Otherwise, the method will update only the values you passed.

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// update column data with the "backlog" ID
board.updateColumn({
id: "backlog",
column: {
label: "Updated column",
limit: 3,
strictLimit: 3,
collapsed: true
},
replace: true
});

Change log:

  • The id and column parameters were added in v1.1
  • The replace parameter was added in v1.3