Skip to content

bug(MatExpansionPanel): not respecting expanded property / mat-menu forcing panels to close #20517

Closed

Description

@Venipa

Reproduction

https://stackblitz.com/edit/components-issue-pj9d3a?file=src%2Fapp%2Fexample-component.html

Steps to reproduce:

  1. mat menu
  2. mat-accordion with panel elements with some of them expanded from the start
  3. open menu
  4. all panels are open/expanded
  5. close menu
  6. reopen menu
  7. 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

Activity

  1. added
    needs triage
    on Sep 9, 2020
  2. Venipa commented on Sep 11, 2020

    @Venipa
    Author

    according to the behavior the expanded property is still respected except for the content.
    the content is "not loaded/rendered" but it is "expanded"

  3. crisbeto commented on Sep 13, 2020

    @crisbeto
    Member

    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.

  4. added
    animation
    P3
    and removed
    needs triage
    on Sep 13, 2020
  5. Venipa commented on Sep 14, 2020

    @Venipa
    Author

    My guess it's a cdk issue, tried making an own menu but it still happened

  6. szymonlisiecki commented on Apr 20, 2022

    @szymonlisiecki

    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?

  7. Bobbitoo commented on Nov 22, 2023

    @Bobbitoo

    I have the same problem. Any updates on that issue?

  8. rakshitongit commented on Feb 22, 2024

    @rakshitongit

    I have the same problem. Any updates on this issue? :(

  9. niralishah1599 commented on Jul 29, 2024

    @niralishah1599

    I am facing same issue. please let me know how to resolve this issue.

  10. self-assigned this
    on Dec 5, 2024
  11. added 2 commits that reference this issue on Dec 5, 2024
    bcfd6c3
    b35c757
  12. added 2 commits that reference this issue on Dec 5, 2024
    7b64c45
    aafa151
  13. angular-automatic-lock-bot commented on Jan 5, 2025

    @angular-automatic-lock-bot

    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.

  14. locked and limited conversation to collaborators on Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3animationarea: material/menu

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions