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
If you need to open/close several task branches, the fastest way is to programatically set the corresponding boolean value (true - to open, false - to close)
39
-
to the *.$open* property of the needed tasks and then redraw the gantt.
38
+
If you need to open or close several task branches, the fastest way is to programmatically set the corresponding boolean value (`true` to open, `false` to close) to the `.$open` property of the needed tasks and then redraw Gantt.
40
39
41
40
- expanding all tasks:
42
41
43
42
~~~js
44
-
gantt.eachTask(function(task){
43
+
gantt.eachTask((task)=>{
45
44
task.$open=true;
46
45
});
47
46
gantt.render();
@@ -50,7 +49,7 @@ gantt.render();
50
49
- collapsing all tasks:
51
50
52
51
~~~js
53
-
gantt.eachTask(function(task){
52
+
gantt.eachTask((task)=>{
54
53
task.$open=false;
55
54
});
56
55
gantt.render();
@@ -62,101 +61,84 @@ If you want to collapse/expand all tasks at once with a button, go to the [How t
62
61
63
62
## Getting the children of a task
64
63
65
-
To get the children of a branch task, use the [getChildren](api/method/getchildren.md) method:
64
+
To get the children of a branch task, use the [`getChildren()`](api/method/getchildren.md) method:
To set the template for tree nodes, use the **template** attribute in the [columns](api/config/columns.md) property.
119
+
To set the template for tree nodes, use the `template` attribute in the [columns](api/config/columns.md) property.
138
120
139
-
The return value of the **template'**s function will be added as an inner HTML. That's why, you can use any HTML structures in the attribute.
121
+
The return value of the `template` function will be added as inner HTML. That is why you can use any HTML structures in the attribute.
140
122
141
123
:::note
142
-
Note, if you don't use [dhtmlxConnector](https://docs.dhtmlx.com/connector__php__index.html) to [integrate with the server side](guides/server-side.md), you have to sanitize the data
143
-
you load into the Gantt chart in order to prevent possible XSS attacks ([dhtmlxConnector](https://docs.dhtmlx.com/connector__php__index.html) does it automatically)
124
+
If you don't use [dhtmlxConnector](https://docs.dhtmlx.com/connector__php__index.html) to [integrate with the server side](guides/server-side.md), you have to sanitize the data you load into the Gantt chart in order to prevent possible XSS attacks. [dhtmlxConnector](https://docs.dhtmlx.com/connector__php__index.html) does it automatically.
0 commit comments