Issue
i want to disabled the rows that doen't match my criteria but the property doesn't return a single disabled row
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;" [class.disabled] = "row?.statut === 'TRM' ? true: null"></mat-row>
Solution
you can disable the click(if there is some selection event) and apply style to the row.
<mat-row *matRowDef="let row; columns: displayedColumns;"
(click)="!row.statut"
[ngStyle]="row.statut && {'background-color': 'lightgrey'}">
Answered By - avayer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.