Description
Feature Description
Currently, CdkAccordion.closeAll
only works on when multi=true
. While this makes sense as a counterpart to openAll
, it would also make sense to allow the method to work also when only one item is opened.
Use Case
Programatically closing any open accordion item when not sure which is open - eg. when adding a new item. Opening the item on addition (onInit) causes "Expression changed after it was checked" type of bug when other is open - it does not close, because it was already checked.
Avoiding this mess:
this.dCollapseGroup.multi = true;
this.dCollapseGroup.closeAll();
this.dCollapseGroup.multi = false;