-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[Sort] Arrow shown if parent called animateChild() #9844
Comments
Yeesh, weird bug. Thanks for reporting |
Hello, When first tab is initially render all arrows are as they must be. The issue still appears even if you don't use this animation by removing binds of trigger from template and even with a void animation (trigger('animation', []). I made a little StackBlitz to reproduce the issue : https://stackblitz.com/edit/angular-material2-issue-6s8ykr Which versions of Angular, Material, OS, TypeScript, browsers are affected? Hope this can help to fix this bug. |
Hi, @Personne0012 , Thank you for sharing your issue. I have looked at your stackblitz, I believe that your issue is caused by the tab-body's "@ translateTab" animation which is played when switching tab from one to another. That's why the sort header indicators display well in the first tab rendered and become weird when navigating to another. They are all related to their parent's animations. |
I was experiencing this when I had my table working in a mat-tab-group. I switched to a nav mat-tab-nav-bar similar to this example (https://github.com/angular/material2/blob/master/src/demo-app/table/table-demo-page.html) and am no longer experiencing the issue. |
For a long time the sort header's animation was set up by rendering out 4 `div` elements and then arranging them to look like an arrow. This is somewhat complicated to maintain, difficult to customize, in some cases it leads to weird visual bugs and ends up triggering excessive change detections. On top of that, because it depends on `@angular/animations`, it is prone to memory leaks (see angular/angular#54149). These changes aim to simplify the component and make it more robust by using an `svg` icon and dealing with the animations. Fixes angular#9758. Fixes angular#9844. Fixes angular#10088. Fixes angular#15451. Fixes angular#19441.
For a long time the sort header's animation was set up by rendering out 4 `div` elements and then arranging them to look like an arrow. This is somewhat complicated to maintain, difficult to customize, in some cases it leads to weird visual bugs and ends up triggering excessive change detections. On top of that, because it depends on `@angular/animations`, it is prone to memory leaks (see angular/angular#54149). These changes aim to simplify the component and make it more robust by using an `svg` icon and dealing with the animations. Fixes angular#9758. Fixes angular#9844. Fixes angular#10088. Fixes angular#15451. Fixes angular#19441. Fixes angular#10242.
For a long time the sort header's animation was set up by rendering out 4 `div` elements and then arranging them to look like an arrow. This is somewhat complicated to maintain, difficult to customize, in some cases it leads to weird visual bugs and ends up triggering excessive change detections. On top of that, because it depends on `@angular/animations`, it is prone to memory leaks (see angular/angular#54149). These changes aim to simplify the component and make it more robust by using an `svg` icon and dealing with the animations. Fixes #9758. Fixes #9844. Fixes #10088. Fixes #15451. Fixes #19441. Fixes #10242. (cherry picked from commit a08eeeb)
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. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Sort header arrow and indicator should animate normally if any parent animation calls "animateChild()" with query.
What is the current behavior?
The mat-sort-header-arrow animation is stuck with "ng-animate-queued" status. All arrows are shown when the DOM is rendered.
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
https://stackblitz.com/edit/angular-material2-issue-6jcfm7?file=main.ts
What is the use-case or motivation for changing an existing behavior?
Add fade in animation to the table when entering. This was working in 5.1.0.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular material & cdk 5.2.0
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: