Skip to content

Mat-expansion panel is opened while been animated #16534

Closed

Description

@frct1

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue

Steps to reproduce:

  1. Add enter animation to mat-accordion
  2. https://components-issue-wabdrn.stackblitz.io

Expected Behavior

While user see animation of entering mat-accordion: content of mat-expansion-panel should be hidden = panel should be closed.

Actual Behavior

Content of mat-expansion panel is opened in animation. After animation completed it's closing...

Environment

  • Angular: 8.0.0 (same with 8.1.0)
  • CDK/Material:
  • Browser(s): Chrome 75
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Activity

  1. andrewseguin commented on Jul 17, 2019

    @andrewseguin
    Contributor

    Root cause seems to be due to Angular's priority of executing parent animations before children animations, which means the expansion panel waits to set itself up. It makes sense to me to do a better job of initializing the expansion panel outside of animations to avoid this.

  2. added
    P3
    on Jul 17, 2019
  3. frct1 commented on Jul 17, 2019

    @frct1
    Author

    Hello there
    Thank you for the answer. I will glad to see it fixed in next updates ;)

  4. meblum commented on Jul 13, 2020

    @meblum

    Same issue, having an expansion panel in a mat-dialog. When opening the dialog the expansion opens first and then closes.

  5. meblum commented on Jul 13, 2020

    @meblum

    Possible duplicate of #11765

  6. brankoEISI commented on Jul 22, 2020

    @brankoEISI

    Same here.

  7. meblum commented on Jul 22, 2020

    @meblum

    Here’s an easy workaround that solved it for me #11765 (comment)

    Add the css rules globally so it fixes the entire app.

  8. self-assigned this
    on Dec 5, 2024
  9. added 2 commits that reference this issue on Dec 5, 2024
    bcfd6c3
    b35c757
  10. added 2 commits that reference this issue on Dec 5, 2024
    7b64c45
    aafa151
  11. 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.

  12. 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

P3area: material/expansion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions