is there any way how to set different width for column ?
After many tries, it seems columns are even, ignoring all styles.
is there any way how to set different width for column ?
After many tries, it seems columns are even, ignoring all styles.
yes, it is possible using css .mat-column-<matColumnDef-value>
, suppose you have a column def "group" like:
<!-- Group Column -->
<ng-container matColumnDef="group">
<mat-header-cell *matHeaderCellDef mat-sort-header>Group</mat-header-cell>
<mat-cell *matCellDef="let element">
{{element.group}}
</mat-cell>
</ng-container>
In the css you can set the width:
.mat-column-group {
width: 150px;
max-width: 150px;
}
this is awkward, it is not possible to override styles by width
... min-width
has to be applied.