Reputation: 2627
I have a solution here how to make angular table header sticky: how to make angular table with sticky header stick to an offset
My next question is how to make it stick while inside mat-sidenav-container. Wrapping the table inside mat-sidenav-container doesn't work: https://stackblitz.com/edit/angular-h1utvg-zpqlsa?file=app%2Ftable-sticky-header-example.html
I can see that mat-sidenav-container and mat-sidenav content set the position to relative. I've tried manipulating the position property to no avail.
Upvotes: 0
Views: 510
Reputation: 866
I think you should wrap table
with some container
and set some max-height
to it. See example.
Upvotes: 0