Upon using DataTable Directive in Angular, shows all data on first page itself (no pagination),on deleting any row it still persist on frontend upon page switch #1663
Replies: 3 comments
-
Hello, Try using this example https://l-lin.github.io/angular-datatables/#/basic/server-side-angular-way and see if this is fixed for you. Can you provide a reproducible StackBlitz repo to investigate this? Also, please note, I'm moving this issue as a "discussion". |
Beta Was this translation helpful? Give feedback.
-
The best way to resolve this problem is to initialize the table AFTER you fetch the data from server.
Hope this helps :) |
Beta Was this translation helpful? Give feedback.
-
You may have to rerender the table when new data comes in or when the page refreshes.
My
So, in essence, I destroy and rerender the table on every new dataset that comes through. |
Beta Was this translation helpful? Give feedback.
-
Hi Team,
Datatable pagination not working upon performing any activity
1) ISSUE -1
I am Using DataTable Directive in angular (version 13), So in this I fetch data from the pubic api "https://api.covidtracking.com/v1/us/daily.json" and all data shows properly with DataTable pagination
But after refreshing page, it shows all data in first page itself (IT SHOULD SHOW ALL DATA WITH PAGINATION)
All Data shown with Pagination:
After refresh Data shown by DataTable on one Page only:
2) ISSUE 2:
When we click on delete button, selected row gets filter from data array, row gets deleted from frontend also. But upon page switch and come back to page, deleted row still persist in frontend view.
After switch to another page and then back to previous page
BELOW IS MY CODE:
File 1:html file
File 2: .ts file
Please check why DataTable shows this behavior upon deleting any row. Suggest some api by using which we solve pagination
issue in angular(v-13)
Beta Was this translation helpful? Give feedback.
All reactions