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
{{ message }}
Repository navigation
[Table] Sort arrows are not rendered properly in tabs #7291
When you set your sort by default as ASC or DESC like that:
@ViewChild(MatSort) mdSort: MatSort;
ngOnInit() {this.mdSort.start = 'desc';}
The arrow is just ugly ( 2 times on 3 ). If you click again on the sort icon, it's pretty :)
BTW: Under IE11 it's always ugly. Same issue or not I don't know
What is the current behavior?
What is the expected behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.3
OS: Windows 7 Pro 64 bits
TS: 2.4.1
Material: 2.0.0-beta.11
Browser: Chrome V60
Is there anything else we should know?
Nothing #
Reacted by Michele Schäuble, Vlad, Matthew Kendrick Co, Michael Kriese, Jeff, Clint Buhs, Fouad Messaia, Maxime, Rémi BUTET, Mykhailo Padalka and 28 more
changed the title [-]BUG: Ugly arrow on sort for data-table (with arrow by default)[/-][+]Ugly arrow on sort for data-table (with arrow by default)[/+]on Sep 25, 2017
In fact, I found something interesting. It's when I use a <md-tab> and if my <md-table> is not in the first tab (loaded on the load of the page), the initialization of arrow is bad. Sorry I didn't have the time to do a plunker now ( if you don't understand, I will try to do it begining with yours ) but the idea is something like that:
<mat-tab-group *ngIf="accountExist">
<mat-tab label="{{'USER' | translate}}">
<mat-card fxLayout="column">
<mat-card-content>
<app-info-user></app-info-user> // my first <md-table> is inside this component
</mat-card-content>
</mat-card>
</mat-tab>
<mat-tab label="{{'FAMILY' | translate}}">
<mat-card fxLayout="column">
<mat-card-content>
<app-families-user></app-families-user> // my second <md-table> is inside this component
</mat-card-content>
</mat-card>
</mat-tab>
</mat-tab-group>
The second table "families" will have a ugly arrow even with with a sort "asc" or "desc"
@andrewseguin , Have you seen my previous message, why this issue is closed ?
It's not the same problem, so the solution mentioned in your PR will throw only the error but I will continue to get this error because the name "asc" is correct. For me, it's just link to the <md-table> which is included in a <md-tab> :)
Great thanks for the repro. Looks like the states are being set properly but the animations framework isn't animating the arrow. I'll talk to the core animations guy to see if we can dive into this and see why it's not triggering.
changed the title [-]Ugly arrow on sort for data-table (with arrow by default)[/-][+][Table] Sort arrows are not rendered properly in tabs[/+]on Oct 19, 2017
Still an issue for me in Material 7.2.0. Can't put a sortable table inside of a mat tab group. The table header arrow changes to a "T" after clicking one of the parent tabs.
I still have this issue https://gyazo.com/d5b184b83fe43eb58196705ac5d9a4c6 with navigation tabs mat-tab-nav-bar.
Angular: 7.2.15
Material: 7.2.2
Typescript: 3.2.4
Chrome: 74.0.3729.157 (Official Build) (64-bit)
OS: macOS Mojave 10.14.4
Activity
[-]BUG: Ugly arrow on sort for data-table (with arrow by default)[/-][+]Ugly arrow on sort for data-table (with arrow by default)[/+]andrewseguin commentedon Sep 27, 2017
I was able to reproduce the issue and I suspect what is happening here is that you are setting an invalid direction (e.g.
ascendinginstead ofasc)Plunker to show issue: https://plnkr.co/edit/vf61Yr6tvDtOlKRr9zeN?p=preview
Can you verify that this was the issue?
Adding PR #7378 that will throw an error if the direction is invalid.
kevincaradant commentedon Sep 28, 2017
Hi
Good try, but I think it's not the problem.
In fact, I found something interesting. It's when I use a
<md-tab>and if my<md-table>is not in the first tab (loaded on the load of the page), the initialization of arrow is bad. Sorry I didn't have the time to do a plunker now ( if you don't understand, I will try to do it begining with yours ) but the idea is something like that:The second table "families" will have a ugly arrow even with with a sort "asc" or "desc"
kevincaradant commentedon Oct 1, 2017
@andrewseguin , Have you seen my previous message, why this issue is closed ?
It's not the same problem, so the solution mentioned in your PR will throw only the error but I will continue to get this error because the name "asc" is correct. For me, it's just link to the
<md-table>which is included in a<md-tab>:)Regards
NB: I will try to do a plunkr
andrewseguin commentedon Oct 1, 2017
Hey yeah - let's open this back up to figure out what's going on. Sounds like perhaps animations isn't firing off.
Definitely try and get a plunker going so we can dive into this. Thanks
kevincaradant commentedon Oct 1, 2017
This is the plunker :)
https://plnkr.co/edit/Idc73Kn0ViLI4Qpsp98g?p=preview
Go on the second tab => "family"
andrewseguin commentedon Oct 6, 2017
Great thanks for the repro. Looks like the states are being set properly but the animations framework isn't animating the arrow. I'll talk to the core animations guy to see if we can dive into this and see why it's not triggering.
[-]Ugly arrow on sort for data-table (with arrow by default)[/-][+][Table] Sort arrows are not rendered properly in tabs[/+]41 remaining items
EricParks commentedon Dec 24, 2018

Still an issue for me in Material 7.2.0. Can't put a sortable table inside of a mat tab group. The table header arrow changes to a "T" after clicking one of the parent tabs.manishvyas1911 commentedon Jan 13, 2019
The issue was due to mat-table in mat-tab
You just need to lazy load mat-tab.
eddyzhu1980 commentedon Jan 16, 2019
Thank you very much. It works perfectly.
IrinaPyl commentedon May 20, 2019
I still have this issue https://gyazo.com/d5b184b83fe43eb58196705ac5d9a4c6 with navigation tabs
mat-tab-nav-bar.Angular: 7.2.15
Material: 7.2.2
Typescript: 3.2.4
Chrome: 74.0.3729.157 (Official Build) (64-bit)
OS: macOS Mojave 10.14.4
vzR commentedon Jul 25, 2019
same issue present also in the current angular-material documentation https://material.angular.io/components/table/overview#sorting

Chrome: Version 75.0.3770.142 (Official Build) (64-bit)
OS: Windows 10 64-bit
femtozer commentedon Jan 24, 2020
I still have rendering issues with these arrows :

Angular: 8.3.20
Material: 8.2.3
Typescript: 3.5.3
Chrome: 79.0.3945.117 (Official Build) (64-bit)
OS: macOS Mojave 10.14.6
MoshinaT commentedon Mar 23, 2020
But it is removing the sorting functionality
crisbeto commentedon Dec 2, 2024
Fixed in #30057.
angular-automatic-lock-bot commentedon Jan 2, 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.