Hello. Lets say if i collapsed the operation geps as shown and i refreshed the page, then by default all taska open(ie expand) but i want it to retain the previous state(ie collapse) and vice versa Also .
Thank you
Hello. Lets say if i collapsed the operation geps as shown and i refreshed the page, then by default all taska open(ie expand) but i want it to retain the previous state(ie collapse) and vice versa Also .
Hello,
The “open” state is saved in the $open
property:
https://docs.dhtmlx.com/gantt/desktop__task_properties.html#:~:text=the%20first%20task.-,%24open,-boolean
If you want to see the tasks opened or closed after you reload the page, you need to save the “open” state in the open
property:
https://docs.dhtmlx.com/gantt/desktop__task_properties.html#:~:text=Specifies%20whether%20the%20task%20branch%20will%20be%20opened%20initially
By default, all tasks are loaded in the collapsed state:
https://snippet.dhtmlx.com/x94shpmu
But when there is the open:true
property, Gantt expands the task:
The tasks can be opened if you enable the open_tree_initially
config:
https://docs.dhtmlx.com/gantt/api__gantt_open_tree_initially_config.html
Here is an example:
https://snippet.dhtmlx.com/ve7tga8u
But the open
property has a higher priority over that config:
https://snippet.dhtmlx.com/9z9wke9c