Expanding/collapsing several branches not by id,


#1

Hey I want to Expanding/collapsing several branches but not by their id property, but custom property instead.

Is this possible?

Thanks.


#2

Hello Adir,
The open and close methods accept only the id parameter.
If you want to do something else, you need to implement a custom solution.

For changing how the task is displayed, you can modify its temporary property $open:

However, do you really need that? Maybe it is better to add a condition check to determine if the branch should be collapsed?
For example, you can try something like this:

if (task.property == 'collapse_me') gantt.close(task.id);

#3

Got you, thank you for your answer Ramil.