diff --git a/docs/api/config/js_kanban_cards_config.md b/docs/api/config/js_kanban_cards_config.md index 4357de1..3495890 100644 --- a/docs/api/config/js_kanban_cards_config.md +++ b/docs/api/config/js_kanban_cards_config.md @@ -92,7 +92,7 @@ For each card you can specify the following parameters (data): - `custom_key` - (optional) a custom key of the card. You can specify the custom keys to place the card into column and row. See the [columnKey](../js_kanban_columnkey_config) and [rowKey](api/config/js_kanban_rowkey_config.md) properties :::info -If you want to load new data for cards dynamically, you can use the [**parse()**](api/methods/js_kanban_parse_method.md) method! +If you want to load new data for cards dynamically, you can use the [**setConfig()**](api/methods/js_kanban_setconfig_method.md) or [**parse()**](api/methods/js_kanban_parse_method.md) method! ::: ### Example diff --git a/docs/api/config/js_kanban_columns_config.md b/docs/api/config/js_kanban_columns_config.md index 6f7fd08..7168eb5 100644 --- a/docs/api/config/js_kanban_columns_config.md +++ b/docs/api/config/js_kanban_columns_config.md @@ -51,7 +51,7 @@ For each column you can specify the following parameters (data): ~~~ :::info -If you want to load new data for columns dynamically, you can use the [`parse()`](../../methods/js_kanban_parse_method) method! +If you want to load new data for columns dynamically, you can use the [`setConfig()`](../../methods/js_kanban_setconfig_method) or [`parse()`](../../methods/js_kanban_parse_method) method! ::: ### Example diff --git a/docs/api/config/js_kanban_links_config.md b/docs/api/config/js_kanban_links_config.md index 25bfc61..3b544a0 100644 --- a/docs/api/config/js_kanban_links_config.md +++ b/docs/api/config/js_kanban_links_config.md @@ -37,7 +37,7 @@ For each link you can specify the following parameters (data): - ***"parent"*** - defines dependency between parent (master) and child (slave) tasks :::info -If you want to load new data for links dynamically, you can use the [**parse()**](api/methods/js_kanban_parse_method.md) method! +If you want to load new data for links dynamically, you can use the [**setConfig()**](api/methods/js_kanban_setconfig_method.md) or [**parse()**](api/methods/js_kanban_parse_method.md) method! ::: ### Example diff --git a/docs/api/config/js_kanban_rows_config.md b/docs/api/config/js_kanban_rows_config.md index 8a752d3..4645fde 100644 --- a/docs/api/config/js_kanban_rows_config.md +++ b/docs/api/config/js_kanban_rows_config.md @@ -37,7 +37,7 @@ For each row (swimlane) you can specify the following parameters (data): - `css` - (optional) defines css styles for a separate row :::info -If you want to load new data for rows (swimlanes) dynamically, you can use the [**parse()**](api/methods/js_kanban_parse_method.md) method! +If you want to load new data for rows (swimlanes) dynamically, you can use the [**setConfig()**](api/methods/js_kanban_setconfig_method.md) or [**parse()**](api/methods/js_kanban_parse_method.md) method! ::: ### Example diff --git a/docs/api/methods/js_kanban_parse_method.md b/docs/api/methods/js_kanban_parse_method.md index 3120295..0aee15c 100644 --- a/docs/api/methods/js_kanban_parse_method.md +++ b/docs/api/methods/js_kanban_parse_method.md @@ -10,6 +10,8 @@ description: You can learn about the parse method in the documentation of the DH @short: Parses data into Kanban +This method performs the same operation as [`setConfig`](/api/methods/js_kanban_setconfig_method) when used with data-related Kanban settings. It is therefore recommended to use `setConfig` for consistency with other configuration options, although `parse` remains supported as an alias for data parsing. + ### Usage ~~~jsx {} diff --git a/docs/guides/integration_with_angular.md b/docs/guides/integration_with_angular.md index 3dc7e7e..01e511d 100644 --- a/docs/guides/integration_with_angular.md +++ b/docs/guides/integration_with_angular.md @@ -253,7 +253,7 @@ export class KanbanComponent implements OnInit, OnDestroy { } ~~~ -You can also use the [`parse()`](/api/methods/js_kanban_parse_method/) method inside the `ngOnInit()` method of Angular to load data into Kanban. +You can also use the [`setConfig()`](/api/methods/js_kanban_setconfig_method/) or [`parse()`](/api/methods/js_kanban_parse_method/) method inside the `ngOnInit()` method of Angular to load data into Kanban. The `setConfig` or `parse()` method provides data reloading on each applied change. ~~~jsx {2,23,37-42} title="kanban.component.ts" import { Kanban, Toolbar } from '@dhx/trial-kanban'; @@ -292,8 +292,8 @@ export class KanbanComponent implements OnInit, OnDestroy { // other configuration properties }); - // apply the data via the parse() method - this._kanban.parse({ + // apply the data via the setConfig() or parse() method + this._kanban.setConfig({ columns, cards, rows @@ -307,8 +307,6 @@ export class KanbanComponent implements OnInit, OnDestroy { } ~~~ -The `parse(data)` method provides data reloading on each applied change. - Now the Kanban component is ready to use. When the element will be added to the page, it will initialize the Kanban with data. You can provide necessary configuration settings as well. Visit our [Kanban API docs](/api/overview/properties_overview/) to check the full list of available properties. #### Handling events diff --git a/docs/guides/integration_with_react.md b/docs/guides/integration_with_react.md index 50111ca..f833bd9 100644 --- a/docs/guides/integration_with_react.md +++ b/docs/guides/integration_with_react.md @@ -254,7 +254,7 @@ export default function KanbanComponent(props) { } ~~~ -You can also use the [`parse()`](/api/methods/js_kanban_parse_method/) method inside the `useEffect()` method of React to load data into Kanban: +You can also use the [`setConfig()`](/api/methods/js_kanban_setconfig_method/) or [`parse()`](/api/methods/js_kanban_parse_method/) method inside the `useEffect()` method of React to load data into Kanban. The `setConfig` or `parse()` method provides data reloading on each applied change. ~~~jsx {9-11,27} title="Kanban.jsx" import { useEffect, useRef } from "react"; @@ -283,7 +283,8 @@ export default function KanbanComponent(props) { // other configuration properties }); - kanban.parse({ columns, cards, rows }); + kanban.setConfig({ columns, cards, rows }); + // or kanban.parse({ columns, cards, rows }); return () => { kanban.destructor(); @@ -298,8 +299,6 @@ export default function KanbanComponent(props) { } ~~~ -The `parse(data)` method provides data reloading on each applied change. - Now the Kanban component is ready. When the element will be added to the page, it will initialize the Kanban with data. You can provide necessary configuration settings as well. Visit our [Kanban API docs](/api/overview/properties_overview/) to check the full list of available properties. #### Handling events diff --git a/docs/guides/integration_with_svelte.md b/docs/guides/integration_with_svelte.md index c13afde..a107863 100644 --- a/docs/guides/integration_with_svelte.md +++ b/docs/guides/integration_with_svelte.md @@ -243,7 +243,7 @@ onDestroy(() => { ~~~ -You can also use the [`parse()`](/api/methods/js_kanban_parse_method/) method inside the `onMount()` method of Svelte to load data into Kanban: +You can also use the [`setConfig()`](/api/methods/js_kanban_setconfig_method/) or [`parse()`](/api/methods/js_kanban_parse_method/) method inside the `onMount()` method of Svelte to load data into Kanban. The `setConfig` or `parse()` method provides data reloading on each applied change. ~~~html {6-8,27} title="Kanban.svelte"