You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that [date_format](api/config/date_format.md) config specifies the format of dates (<b>start_date</b> of the task) that comes from the server.
334
+
Note that [date_format](api/config/date_format.md) config specifies the format of dates (<b>start_date</b> of the task) that comes from the server. The [gantt.config.open_tree_initially](api/config/open_tree_initially.md) config is set to `true` to ensure that the tasks tree will be initially expanded.
337
335
338
336
Let's run the application now by opening http://127.0.0.1:1337. The gantt will be loaded with the test data that we have previously added into the database.
339
337
@@ -344,7 +342,7 @@ Step 5. Saving changes
344
342
345
343
The last thing that we should implement is data saving.
346
344
For this we need a code that will send updates happening on the client side back to the server.
347
-
Go to *public/index.html* and add [gantt.dataProcessor](guides/server-side.md#technique) to the page:
345
+
Go to *public/index.html* and add [gantt.createDataProcessor](guides/server-side.md#technique) to the page:
348
346
349
347
350
348
~~~js title="public/index.html"
@@ -354,9 +352,10 @@ gantt.init("gantt_here");
354
352
355
353
gantt.load("/data");
356
354
357
-
constdp=newgantt.dataProcessor("/data");/*!*/
358
-
dp.init(gantt);/*!*/
359
-
dp.setTransactionMode("REST");/*!*/
355
+
constdp=gantt.createDataProcessor({ /*!*/
356
+
url:'/data', /*!*/
357
+
mode:'REST', /*!*/
358
+
}); /*!*/
360
359
~~~
361
360
362
361
Let's go deeper and see what role it plays.
@@ -377,10 +376,11 @@ The resulting code will be rather spacious:
0 commit comments