-
Notifications
You must be signed in to change notification settings - Fork 6.8k
mat-expansion-panel re-renders multiple times in a very simple case (no animation, OnPush). #14952
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
Comments
It looks like the expansion panel does not rerender entirely multiple times, though change detection seems to be run multiple times unnecessarily. |
Is there any workaround? My panel is jumping up and down :( |
Reworks the expansion panel to animate purely with CSS, rather than going through the `@angular/animations` module. This simplifies the setup and allows us to resolve several long-standing bug reports. Fixes angular#27946. Fixes angular#22715. Fixes angular#21434. Fixes angular#20610. Fixes angular#20517. Fixes angular#17177. Fixes angular#16534. Fixes angular#16503. Fixes angular#14952. Fixes angular#14759. Fixes angular#14075. Fixes angular#11765.
Reworks the expansion panel to animate purely with CSS, rather than going through the `@angular/animations` module. This simplifies the setup and allows us to resolve several long-standing bug reports. Fixes angular#27946. Fixes angular#22715. Fixes angular#21434. Fixes angular#20517. Fixes angular#17177. Fixes angular#16534. Fixes angular#16503. Fixes angular#14952. Fixes angular#14759. Fixes angular#14075. Fixes angular#11765.
Reworks the expansion panel to animate purely with CSS, rather than going through the `@angular/animations` module. This simplifies the setup and allows us to resolve several long-standing bug reports. Fixes #27946. Fixes #22715. Fixes #21434. Fixes #20517. Fixes #17177. Fixes #16534. Fixes #16503. Fixes #14952. Fixes #14759. Fixes #14075. Fixes #11765. (cherry picked from commit aafa151)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
What is the expected behavior?
mat-expansion-panel updates (renders) exactly once when there is no reason to do it multiple times.
What is the current behavior?
mat-expansion-panel renders at least 2 times ([@.disabled]="true"+ ChangeDetectionStrategy.OnPush)
or even more times if animation is enabled (default) and change detection mode is Default.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-rj4nhe?file=app%2Fexpansion-overview-example.ts
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
7.2.1, Chrome 71
Is there anything else we should know?
It is very important not to have "unexpected" behavior (multiple rendering) because it affects performance metrics. If multiple rendering is "expected" I would suggest to mention about it in docs.
The text was updated successfully, but these errors were encountered: