-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal
Proposal
What is the expected behavior?
Using @ViewChild(MatSort) sort: MatSort;
and <mat-table [dataSource]="dataSource" matSort>
without import { MatSortModule } from '@angular/material';
will throw an error like some other material component (if i remember it's something like "you need to import xxxx....")
What is the current behavior?
Nothing, the sorting arrows are just not displayed (and sorting doesn't work)
What are the steps to reproduce?
Just remove the MatSortModule :
https://stackblitz.com/angular/voqnaoexppp?file=main.ts
What is the use-case or motivation for changing an existing behavior?
I lost many hours on this... i take some code from my stackblitz to my main project and continue developping, but after a moment i see sorting doesn't work anymore without errors in the console... I search, scratch my head, and finally reverse my code to the beginning but still not working !
Finally i found solution online, import MatSortModule... so depressing :(
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest
Is there anything else we should know?
I know it's my fault, but without error it's difficult to find this.