Issue
I am using Angular PrimeNG Paginator Component (i.e p-paginator).
The HTML part of the code looks like :
<div class="paginator paginator-product mb-5">
<p-paginator [rows]="12" pageLinkSize="6" [alwaysShow]="false" [showCurrentPageReport]="true"
[totalRecords]="totalRecords" #paginator (onPageChange)="onPageChange($event)"></p-paginator>
</div>
Here the issue is that, suppose current page is on 6th index, when I am reloading the page, it gets back to 1 (the position of the page is not retaining)
Is there any way, that I can retain the page number even after reloading the page OR make the paginator to get selected at a particular index.
Solution
<p-paginator [rows]="1" [first]="6" [alwaysShow]="false" [showCurrentPageReport]="true"
[totalRecords]="totalRecords" #paginator (onPageChange)="onPageChange($event)"></p-paginator>
Answered By - godocmat

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.