Skip to content

Commit f4ecdf5

Browse files
[update] the setConfig() method (SVAR-2309)
1 parent aafae6b commit f4ecdf5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/api/methods/js_kanban_setconfig_method.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Using this method, you can configure the Kanban widget as well as load data to i
2626

2727
### Example
2828

29-
~~~jsx {10-18,20-23}
29+
~~~jsx {10-20,22-23}
3030
// create Kanban
3131
const board = new kanban.Kanban("#root", {
3232
columns,
@@ -36,18 +36,18 @@ const board = new kanban.Kanban("#root", {
3636
// create Toolbar
3737
const toolbar = new kanban.Toolbar("#toolbar", { api: board.api });
3838

39-
// set new configuration parameters of Kanban
39+
// specify new configuration parameters of Kanban
4040
board.setConfig({
41-
editorAutoSave: false,
4241
columnKey: "stage",
4342
rowKey: "type",
4443
cardShape,
4544
editorShape,
46-
/*other parameters*/
47-
});
48-
49-
// update configuration parameters of Toolbar
50-
toolbar.setConfig({
51-
api: board.api
45+
editor: {
46+
autoSave: false
47+
},
48+
/* other parameters */
5249
});
50+
51+
// specify new configuration parameters of Toolbar
52+
toolbar.setConfig({ items: ["search", "spacer", "sort"] });
5353
~~~

0 commit comments

Comments
 (0)