Reputation: 541
I am using Angular Material 2 with Angular 5. I am using mat-table. I want to fix a single column in mat-table. When i scroll the horizontal bar then a column will fix and not scrolling. Is there possible to fixed a column in mat-table.
Angular Material 2: mat-table link
Upvotes: 2
Views: 7464
Reputation: 73
From material documentation:
It is also possible to fix cell columns to the start or end of the horizontally scrolling viewport. To do this, add the sticky or stickyEnd directive to the ng-container column definition.
Here is example
Upvotes: 6