Skip to main content

setConfig()

Description

Sets new configuration parameters of Kanban

Usage

setConfig(config: object): void;

Parameters

  • config - (required) the object of the Kanban configuration. See the full list of properties here
tip

Using this method, you can configure the Kanban widget as well as load data to it. The method doesn't change history (you cannot change history at all) and themes (use the setTheme() method instead).

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});

// create Toolbar
const toolbar = new kanban.Toolbar("#toolbar", { api: board.api });

// set new configuration parameters of Kanban
board.setConfig({
editorAutoSave: false,
columnKey: "stage",
rowKey: "type",
cardShape,
editorShape,
/*other parameters*/
});

// update configuration parameters of Toolbar
toolbar.setConfig({
api: board.api
});