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
swftvsn opened this issue
Oct 13, 2017
· 3 comments
Assignees
Labels
featureThis issue represents a new feature or feature request rather than a bug or bug fixP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
I need to be able to disable sorting under some circumstances on column level. I'd like to do something like [mat-sort-header]="enabled" where enabled is boolean.
but for some reason this does not do anything when template is set like this:
<mat-tablematSort[dataSource]="dataSource" [matSortDisableClear]="true"><ng-containermatColumnDef="id"><mat-header-cell*matHeaderCellDefmat-sort-header> ID </mat-header-cell><mat-cell*matCellDef="let row"> {{row.id}} </mat-cell></ng-container>
.
.
.
The only way to pull this off is to have duplicate columns, one where mat-sort-header is declared and one where it is not. (And toggle the matHeaderRowDef and columns accordingly.)
The text was updated successfully, but these errors were encountered:
andrewseguin
added
feature
This issue represents a new feature or feature request rather than a bug or bug fix
mat-table
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
and removed
mat-table
labels
Oct 19, 2017
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
featureThis issue represents a new feature or feature request rather than a bug or bug fixP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
I need to be able to disable sorting under some circumstances on column level. I'd like to do something like
[mat-sort-header]="enabled"
where enabled is boolean.What is the current behavior?
I'm not able to dynamically disable sorting
I also experimented with
but for some reason this does not do anything when template is set like this:
The only way to pull this off is to have duplicate columns, one where
mat-sort-header
is declared and one where it is not. (And toggle thematHeaderRowDef
andcolumns
accordingly.)The text was updated successfully, but these errors were encountered: