5

I have on my design page two paginator. When I add two paginators - their data is not synchronized. https://material.angular.io/components/paginator

https://plnkr.co/edit/w5ZuXnfIgmKW1nWgyf3Y?p=preview

<mat-paginator [length]="length"
               [pageSize]="10">
</mat-paginator>

<mat-paginator [length]="length"
              [pageSize]="10">
</mat-paginator>

How can this be achieved?

1

1 Answer 1

9

This may be an old question, still found a now-working solution to this:

<mat-paginator #paginatorTop 
               [length]="length"
               [pageSize]="10"
                (page)="paginatorBottom.pageIndex = $event.pageIndex">
</mat-paginator>

<mat-paginator #paginatorBottom 
              [length]="length"
              [pageSize]="10"
              (page)="paginatorTop.pageIndex = $event.pageIndex">
</mat-paginator>

Maybe this still helps someone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.