Bug: mat-expansion-panel opens all panels in the mat-accordian when used with in mat-menu
All panels should close by default.
All panels is open by default.
https://stackblitz.com/edit/angular-xw9sqj
Similiar Issue
https://stackoverflow.com/q/48388343/1267073
Use-case- Show a folder structure view
Angular - 5.2.5
material - 5.2.1
#### Is there anything else we should know?
-
Closing as placing a MatAccordion or MatExpansionPanel inside of a mat-menu element is not a supported configuration.
Any suggestions to implement that use case ?
@sajaynambiar I would like to see this supported or a way to implement this as well.
You can get around this by manually updating the classes-- I think you could fix the animations using a css animation (but haven't worked that part out 100% yet) .
Would be something like this in the .ng.html:
<mat-expansion-panel #myPanel [class.is-expanded]="myPanel.expanded" [class.is-collapsed]="!myPanel.expanded">
and in the css:
.is-expanded {
.mat-expansion-panel-content {
visibility: inherit !important; //overwrite the element style
height: inherit !important; //overwrite the element style
}
}
.is--collapsed {
.mat-expansion-panel-content {
overflow: hidden;
height: 0;
visibility: hidden;
}
}
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Any suggestions to implement that use case ?