2

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

monir tuhin
  • 441
  • 3
  • 13
  • 27

1 Answers1

5

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

amalgama
  • 63
  • 2
  • 10