stateSave issue when server data changes

stateSave issue when server data changes

jdkingjdking Posts: 4Questions: 1Answers: 0

I'm using the latest Datatables and have a table with stateSave turned on and it generally works great.

Now I have an issue where if the data on the server changes, occasionally there can be less pages of data than there were before. So the user comes back to the page and it will be on, say, page 9 of 4, and display the "No Records Found" message unless you go to one of the existing 4 pages.

This is pretty confusing and my user's don't always notice that the pagination is set in a strange way so they just assume there is no data.

Is there any way to make the datatable auto jump to a page with data on it when this happens, I'd even be fine with it resetting back to page 1 if the display start is greater than the total records.

Answers

  • jdkingjdking Posts: 4Questions: 1Answers: 0

    To clarify, I know why the data is changing on the server. I'm simply looking for a way to make Datatable jump to the first page if it tries to access a page beyond the total records after loading a state.

This discussion has been closed.