StateSave not Saving SearchBox/Pagination
StateSave not Saving SearchBox/Pagination
ArielSAdamsNASA
Posts: 105Questions: 15Answers: 0
Link to test case: http://live.datatables.net/riyejume/14/edit
Description of problem: I have statesave applied, but when going to the second page or typing something in the searchbox and refreshing the page, it is not saved. It works fine in the test case, but not when implementing it in my website. I put all the files I am using in the test case and the code line for line. I cannot link the website as it is internal. Is there a good way to debug this issue?
Answers
You are using
stateSaveParams
andstateLoadParams
to modify what is saves and loaded. Also you are usingstate.loaded()
after the Datatable is initialized to customize the environment. Those are the areas to troubleshoot to see where the issue occurs. Use the browser's debugger to step through these areas of code.Kevin
@kthorngren
So stateSaveParams saves the search value, but it is lost in stateLoadParams and state.loaded(). Not sure where to go from there.
http://live.datatables.net/riyejume/17/edit
Note: It works fine in the test case, but not in the website.
Can you post a link to your page so it can be debugged. You can PM Allan or Colin directly with the link if you don't want it public. I'm not sure why it would be lost between
stateSaveParams
andstateLoadParams
.Kevin
@kthorngren I wish I could post the link, but it is an internal website meaning you need to be on center at Goddard or be connected via VPN.
It doesn't need to be the full site - we just need a stripped down example that can help us understand and debug the issue - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
@colin
That is the problem, it works fine in the test case. I copied the code line for line and placed all the files I am using, but the error is not replicable.
Here is the test case again: http://live.datatables.net/riyejume/17/edit
Without being able to see the issue, there's little we can do to progress this, I'm afraid,
Colin