Loading saved state results in showing items 11-5 of 5
Loading saved state results in showing items 11-5 of 5
bgo
Posts: 1Questions: 0Answers: 0
I'm using a Datatable (v1.7.5) with an Ajax data source, pagination and the state saving option enabled. It's working great except for the following problem:
1. View a table with say 15 items and a pagination of 10, and click to the second page.
2. Do something in the background that causes the Ajax source to only return 5 items.
3. Reloading the page with the table will now load the page 2 state, causing it to display "No data available." and "11-5 of 5" by the page buttons.
It seems like the state loading logic doesn't check if the loaded state is valid for the current data set. Perhaps it could reset to the last available page in that case?
1. View a table with say 15 items and a pagination of 10, and click to the second page.
2. Do something in the background that causes the Ajax source to only return 5 items.
3. Reloading the page with the table will now load the page 2 state, causing it to display "No data available." and "11-5 of 5" by the page buttons.
It seems like the state loading logic doesn't check if the loaded state is valid for the current data set. Perhaps it could reset to the last available page in that case?
This discussion has been closed.
Replies
Allan