Skip to content

fix(material/expansion): Expansion panel content flickers during animation for lazy-loaded custom height nested expansion panels #26772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

xAmaris
Copy link

@xAmaris xAmaris commented Mar 11, 2023

This fix introduces workaround for a void => collapsed animation that is causing improper behaviour for lazy-loaded body.

  1. it disables first void => collapsed animation after init to disable recalculation which fixes changing heights of inner panels.
  2. it sets mat-expansion-panel-hidden class on content init and removes it on creating lazy-loaded body to remove flicker of parent expansion panel

BEFORE

chrome-capture-2023-2-11

AFTER

chrome-capture-2023-2-11

Fixes #22715

@xAmaris xAmaris requested a review from andrewseguin as a code owner March 11, 2023 14:45
…ation for lazy-loaded custom height nested expansion panels

This fix introduces workaround for a `void => collapsed` animation that is causing improper behaviour for lazy-loaded body.
First, it disables first `void => collapsed` animation after init to disable recalculation which fixes changing heights of inner panels.
Second, it sets `mat-expansion-panel-hidden` class on content init and removes it on creating lazy-loaded body to remove flicker of parent expansion panel

Fixes angular#22715
@xAmaris xAmaris force-pushed the expansion-panel-flickering branch from 92899e7 to 7855d97 Compare March 11, 2023 14:53
@crisbeto
Copy link
Member

crisbeto commented Dec 5, 2024

Closing in favor of #30119.

@crisbeto crisbeto closed this Dec 5, 2024
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants