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 the full list of properties here
tip
This method allows you to adjust the Kanban widget settings and load data into it. Note that it doesn't affect history (modifying history is not supported) or themes (use the setTheme()
method for that).
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 with new parameters
board.setConfig({
columnKey: "stage",
rowKey: "type",
cardShape,
editorShape,
editor: {
autoSave: false
},
/* other parameters */
});
// update Toolbar configuration with new items
toolbar.setConfig({ items: ["search", "spacer", "sort"] });