0

I want to avoid a vertical scroll bar in mat-table in the responsive resolutions. For that I need to reduce the mat-paginator [pageSize] attribute value to 4. Can we set different [pageSize] values for different resolutions?

<mat-paginator #paginator [pageSize]="10" [pageSizeOptions]="[5, 10, 20]"
                          (page)="tableService.mgOnPaginateChange($event)">
</mat-paginator>
vsg
  • 175
  • 2
  • 11
  • https://developer.mozilla.org/en-US/docs/Web/API/Screen/height – Roberto Zvjerković Feb 17 '21 at 11:08
  • You can take help of (CDK)[https://material.angular.io/cdk/layout/overview] for this. Here is one directive built using CDK https://csharpcode.org/blog/detect-viewport-size-with-the-help-of-angular-cdk-breakpointobserver/ – Nikhil Walvekar Feb 18 '21 at 07:26

0 Answers0