Datatable paging after deleting a record with lazy loading
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 :
-
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) .
-
When there is only one record on third page, the datatable should shift to 2nd page.
-
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 ?
Please use forum for support requests and questions, thank you.