components
components copied to clipboard
bug(MatExpansionPanel): not respecting expanded property / mat-menu forcing panels to close
Reproduction
https://stackblitz.com/edit/components-issue-pj9d3a?file=src%2Fapp%2Fexample-component.html
Steps to reproduce:
- mat menu
- mat-accordion with panel elements with some of them expanded from the start
- open menu
- all panels are open/expanded
- close menu
- reopen menu
- all expanded panels are now closed
Expected Behavior
What behavior were you expecting to see? expanded panel after reopening mat-menu
Actual Behavior
What behavior did you actually see? closes any expanded panel after reopening mat-menu
Environment
- Angular: 10.0.8
- CDK/Material: 10.1.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
according to the behavior the expanded property is still respected except for the content. the content is "not loaded/rendered" but it is "expanded"
My bet is this is due to the menu blocking child animations while it's animating since the expanded/collapsed state of the accordion depends on an animation. It can be seen on repeat opens since the current release has a bug where the menu only animates on the first open: note how the first time it's closed, the accordion gets collapsed, but then it's fine if you keep opening and closing it.
My guess it's a cdk issue, tried making an own menu but it still happened
note how the first time it's closed, the accordion gets collapsed, but then it's fine if you keep opening and closing it.
I've got exact same problem. First of all, accordions are closed on the first focusout from mat menu, and then the first opening/closing is without animations. Also accordion opens on the second click (just the first time).
Any updates on that issue?
I have the same problem. Any updates on that issue?
I have the same problem. Any updates on this issue? :(