0

I am using a mat-table with data flowing at run-time. It has a sticky header. I am looking to freeze few rows based upon a certain condition. My problem is , I am unable to find anything related to sticky rows.

I've seen this Sticky table rows, but differs a lot from my requirement. Also, tried matRowDef="position: sticky" and other parameters related to sticky.

Can anyone guide me as to how can I make a sticky row in a mat-table?

Haze
  • 110
  • 14

1 Answers1

0

mat-table does not support sticking middle rows, but it does support having multiple header or footer rows and they can also be made sticky. You can see an example how to set it in the official documentation (search for Table with multiple header and footer rows).

After configuring it you an easily set them to be sticky, as can be seen in the example Table with a sticky footer.

If you really need to freeze middle rows, you can achieve it by using jQuery.StickyRows plugin

donatasj87
  • 760
  • 9
  • 23