[FIXED] Prime ng paginator how to return to the previous page

Issue

I have a list of documents. Divided into 3 pages. Imagine a situation, the user is on page 2. deletes all documents on this page. How to move it to 1 page after that (forward)

 <p-paginator [showCurrentPageReport]="true" [rows]="ten" [totalRecords]="lengthDoc" (onPageChange)="transitionPage($event)"></p-paginator>

enter image description here

Solution

After the user deletes all documents on the second page, you must refresh data of the grid. But if you process paging in the server you must send a paging state when refreshing data.

Answered By – Giorgi Asanidze

Answer Checked By – Gilberto Lyons (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published