enableCollapseAll weird behavior

Hi,

I want my gantt to start with the parent tasks collapsed, so I enable the enableCollapseAll property:

In component.html:

[enableCollapseAll]="collapse"

In component.ts:

this.collapse = true;

I works fine, every parent task is collapsed at the beginning. The weird behaviour comes when clicking in the little arrow in the column of the parent task to expand it. Instead of expanding the task of the clicked arrow, it expands all the rest tasks and leaves collapsed the clicked one. In the image I have clicked the first task:



Any idea why?

Thanks

3 Replies

JR John Rajaram Syncfusion Team October 10, 2018 09:57 AM UTC

Hi Oscar,
Thanks for contacting Syncfusion support.
We have analyzed the reported query and prepared the sample as per provided code snippet. But we are unable to replicate the reported issue. Please ensure whether “this.collapse” value has been updated in any other actions. If still issue exists at your end kindly modify our sample based on your application along with the replication procedure. This would be helpful for us to serve you better.
Sample
http://www.syncfusion.com/downloads/support/directtrac/general/ze/GanttCollaspeAll413333470 
Regards, 
John R 



TU Tuan replied to John Rajaram August 15, 2020 09:45 AM UTC

Hi Oscar,
Thanks for contacting Syncfusion support.
We have analyzed the reported query and prepared the sample as per provided code snippet. But we are unable to replicate the reported issue. Please ensure whether “this.collapse” value has been updated in any other actions. If still issue exists at your end kindly modify our sample based on your application along with the replication procedure. This would be helpful for us to serve you better.
Sample
http://www.syncfusion.com/downloads/support/directtrac/general/ze/GanttCollaspeAll413333470 
Regards, 
John R 


Hi John Rajaram,


How to connect collapse property to gantt? I can't find any connection between them

And, your sample doesn't work :(, can you check it please?

Thanks



PP Pooja Priya Krishna Moorthy Syncfusion Team August 17, 2020 12:23 PM UTC

Hi Tuan, 
We have downloaded the shared sample and tested. It is working fine from our end. Can you please share details on this? 
  1. Do you face any problem while compiling the project.
  2. Else,  you can run the project but are you facing any console errors?
It will be very helpful, if you share as a screenshot of error you are facing. 
 
We can define property as said in the previous update in component.ts file as like below code example. 
[app.component.html] 
<ej-gantt 
    //... 
    [enableCollapseAll] = "collapse" > 
</ej-gantt> 
 
[app.component.ts] 
export class AppComponent { 
    public ganttData: any;  
    public collapse : boolean;        
    constructor() {  
        this.collapse = true; 
    } 
} 
 
We can also directly assign the value in component.html as like below code example. 
 
<ej-gantt 
    //... 
    [enableCollapseAll] = true> 
</ej-gantt> 
 
 
 
Regards, 
Pooja K. 


Loader.
Up arrow icon