Skip to main content

setConfig()

Description

Updates the Kanban with new configuration settings

Usage

setConfig(config: object): void;

Parameters

  • config - (required) an object containing the Kanban configuration options. Check out the full list of properties here
tip

This method allows you to adjust the Kanban widget's settings and load data into it. Keep in mind that it does not affect the history (changing history is not supported).

Example

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

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

// update Kanban configuration
board.setConfig({
columnKey: "stage",
rowKey: "type",
cardShape,
editorShape,
editor: {
autoSave: false
},
/* other parameters */
});

// update Toolbar configuration
toolbar.setConfig({ items: ["search", "spacer", "sort"] });