Sri
Sri

Reputation: 7

Angular mat-table

Please tell me if it is possible to resize the columns in mat-table. I am using mat-table for displaying my data, column width is fixed as of now. Please tell me if it is possible to make my columns resizable

Upvotes: 1

Views: 131

Answers (2)

maryrio7
maryrio7

Reputation: 330

Yes it is possible. The mat-table assigns a class to each column that can be used to style it. In your styles.css:

.mat-column-columnName {
 flex: 0 0 10%
}

I use this trick to change width. I hope it works for you

Upvotes: 0

GUISSOUMA Issam
GUISSOUMA Issam

Reputation: 2582

It's still not implemented by the angular core team.

There's an open issue for this feature:

https://github.com/angular/components/issues/8312

You can find some community solution/workaraound:

https://stackblitz.com/edit/angular-rtfc5v

Upvotes: 2

Related Questions