You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentanimationThis issue is related to Angular animations or CSS animationsarea: material/expansion
The height to be rendered directly with the set values and not 'jump' to the new value from the 'default hard coded' ones
What is the current behavior?
The mat-expansion-panel-header height will jump to the newly set value (even when using the new MAT_EXPANSION_PANEL_DEFAULT_OPTIONS injection token) resulting in ugly visuals. This is very evident when switching between tabs for example
I was having this same problem and found that disabling animation for the panel header addressed the issue. I just made the change in your Stackblitz example and it seemed to work there as well:
<mat-expansion-panel-header [@.disabled]="true" expandedHeight="60px" collapsedHeight="60px">
This is the expansion 3 title
</mat-expansion-panel-header>
So, as long as the desired behaviour is static header height, this workaround should work
Reacted by vanjavelickov
Reacted by Simon Weaver and Lakshman Kumar Kotipalli
Reacted by DarekDarecki, Lakshman Kumar Kotipalli and Nikolay Zvonov
@cmdickson Phew! This was driving me nuts. Thanks for pointing out that you can do this just on the header - so as to retain expand and contract animations for the panels' contents.
Anyone noticed that if you set [@.disabled]="true" when the expansion panel is within a tab, if you navigate to another tab and then back to the one with the expansion panel in, the animations are re-enabled? Driving me nuts!
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentanimationThis issue is related to Angular animations or CSS animationsarea: material/expansion
Activity
rbogdy commentedon Feb 19, 2019
any news regarding this problem?
cmdickson commentedon Mar 30, 2019
I was having this same problem and found that disabling animation for the panel header addressed the issue. I just made the change in your Stackblitz example and it seemed to work there as well:
So, as long as the desired behaviour is static header height, this workaround should work
simeyla commentedon Apr 19, 2019
@cmdickson Phew! This was driving me nuts. Thanks for pointing out that you can do this just on the header - so as to retain expand and contract animations for the panels' contents.
ghinton commentedon Aug 14, 2019
Anyone noticed that if you set [@.disabled]="true" when the expansion panel is within a tab, if you navigate to another tab and then back to the one with the expansion panel in, the animations are re-enabled? Driving me nuts!
ghinton commentedon Aug 14, 2019
Looking at the markup, it appears that the ng-animate-disabled class is removed when you switch tabs
lubos-bistak commentedon Nov 8, 2019
Any news or progress on this issue?
fix(material/expansion): switch away from animations module
fix(material/expansion): switch away from animations module
fix(material/expansion): switch away from animations module (#30119)
fix(material/expansion): switch away from animations module (angular#…
angular-automatic-lock-bot commentedon Jan 5, 2025
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.