I am using the angular gantt view library. Demo
I don't know why, but i can't start all the tasks collapsed. Basicaly it is just simulate the "Collapse All" button click in Options menu, like $('#btnId').trigger('click')
. But not!!
Someone know why?
If i am not mistaken reading the documentation then default behaviour of "Tree" plugins is to "expand all".
Each row in gantt can contain one or more task, setting all row collapsed will result as all tasks get collapsed too.
If you want to collapsed all row after gantt displayed. Try these :
set your gantt api (inside your html file)
used api event to sent the collapse all command (inside your angular controller).
In case you only want to collapse one row in your tree, replace above code to :
Note : ".find" and ".isEmpty" are lodash. "_.collapsed" is assign by Agular tree plugins and it become property of each row
Hope it helps,
Thanks.