Paging issue using SearchPanes with cascadePanes set to true
Paging issue using SearchPanes with cascadePanes set to true
Test case: https://jsfiddle.net/aghf9xvb/4/
I am aware that there is a compatibility issue between SearchPanes and StateRestore - this might be linked to that issue.
Steps to reproduce in the test case:
1. Select any page of the DataTable other than 1, e.g.page 5
2. Refresh the frame containing the DataTable
3. Page 1 is displayed, despite stateSave being set to true in the table spec
This occurs with cascadePanes set to true. If it is changed to false and the test re-run, the user-selected page is preserved on refresh.
This question has an accepted answers - jump to answer
Answers
Thanks for flagging this up. It looks like SearchPanes is resetting the paging on its own initialisation. I don't have an immediate fix for this I'm afraid, but I have logged it so I can look into it. Hopefully for the next SearchPanes release, but I can't guarantee that.
Allan
I've worked around this issue by saving the current page in sessionStorage when the user leaves the screen.
I then placed this code after the table definition:
Seems to be working well so far. Also, it has the benefit of returning to the selected page even when a filter has been applied, which does not normally happen with SearchPanes even when cascadePanes is set to false.