primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Datatable paging after deleting a record with lazy loading

Open anit05 opened this issue 9 years ago • 1 comments

Hi, I have set up an Angular 2 app that is using primeng datatable. The datatable has lazy loading enabled and data is fetched from an API. Now i have added a delete button to my data-table. The deletion of record works fine but paging does not work properly. When i delete a record say from 3rd page, the datatable paging only shows the first page and with no link to next/previous pages.

There are couple of scenarios i have to implement :

  1. How can i manage this so that , when i delete a record from 3rd page, datatable remains on 3rd page and one record from 4th page shifts to third page (assuming there is 4th page) .

  2. When there is only one record on third page, the datatable should shift to 2nd page.

  3. If there is only single record available in database, deleting that from first page should show no record found message.

What is the process for these ?

anit05 avatar Jun 01 '17 09:06 anit05

Please use forum for support requests and questions, thank you.

cagataycivici avatar Jun 23 '17 11:06 cagataycivici