I need to make the Header of the mat-table component fixed to the top, But It doesn't work.
I have Angular v6.1.7 and @angular/material v6.4.7.
I added the "sticky: true" propertie to the matHeaderRowDef as someone mentions here but it doesn't do anything :(
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
I have this example project: https://stackblitz.com/edit/angular-wem2qa
This is my imports on the TS file:
import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from "@angular/core";
import { MatDialog, MatExpansionPanel, MatSnackBar, MatSort, MatTableDataSource, Sort } from "@angular/material";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With