I have a table like so
<table mat-table class="mat-elevation-z8 w-full" [dataSource]="dataSource">
<!-- Username Column -->
<ng-container matColumnDef="username">
<th mat-header-cell *matHeaderCellDef>Username</th>
<td mat-cell *matCellDef="let element">{{element.username}}</td>
</ng-container>
<!-- Email Column -->
<ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef>Email</th>
<td mat-cell *matCellDef="let element">{{element.email}}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [pageSizeOptions]="[5, 10, 20]" [length]="count" showFirstLastButtons></mat-paginator>
And it works perfectly fine, except for when I go to the last page, where the amount of objects is less than the objects per page, because then the table shrinks in height.
This is how it looks on the last page:
I want the height to be same. So for it to just fill in empty rows until it's the same height as every other page. How do I do that?
Some environment information:
- Angular 11.0.4
- @angular/material ^11.2.0