Gantt.config.open_tree_initially = false not working


#1

I’ve set gantt.config.open_tree_initially = false; but tree shows always expanded, why?


#2

Hi @trony2014!

The open_tree_initially property is set once before calling gantt.init() method, after this point the property does not change the state and appearance of the Gantt.

If the task has an open property, then it has a higher priority than the value of open_tree_initially.

Here you can check the samples with different values ​​or without the open property of the tasks:

gantt.config.open_tree_initially = false;
http://snippet.dhtmlx.com/8af059b8f

gantt.config.open_tree_initially = true;
http://snippet.dhtmlx.com/ba268db0e

Here is a workaround how to make the open_tree_initially property with the highest priority:
http://snippet.dhtmlx.com/547de2245


#3

Ok, it works! Thanks!