Reputation: 4953
I'm working with an accordion and I added two buttons to expandAll/collapseAll panels. Basically I want the user to be able to manage each panel within the accordion.
My issue is the following:
1) Let's say user expands all panels
2) Now, collapse ONLY first panel
3) Now, expand ONLY first panel
4) You have have noticed the othe other panels were collapsed (well this is my issue).
I dont want to other panels to collapse when expanding/collapsing a single panel. I want each panel to act independently. Does anyone know how to make this happen? Here's my code:
expandAllPanels(){
this.arePanelsAllExpanded = true;
}
collapseAllPanels(){
this.arePanelsAllExpanded = false;
}
Upvotes: 0
Views: 1152
Reputation: 1955
As i see you are using primeNG, there is option in accrodion, so you must add this
<p-accordion [multiple]="true">
and all will work as you want. Tried on your Plunker.
Upvotes: 2