DataTable individual searching column working with stateSave function
DataTable individual searching column working with stateSave function
I got the individual searching column working fine with stateSave function, but when I jump to another page and redirect back to the table, the table got filtered based on the searching that I just did before but the searching field got cleared. But for this issue, I have followed the solution shared by Bfullen here...https://datatables.net/forums/discussion/comment/89795/#Comment_89795 and it works just fine...
Now the problem is, the pagination state saving is not functioning anymore after implementing Bfullen's code..Can someone please help? how to make it both work together?(saving the search value when redirecting back to the page, and also saving the pagination state as well)
Replies
Are you saying that the paging buttons aren't displayed or that your are losing the page length specified by the user. Best thing to do is to provide a simple test case showing what you are doing so we can help debug. Also take a look at the browser's console for errors.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Hi thanks for the reply, what I meant for the pagination state saving is supposed when the stateSave is on 'true', for example, I navigate to the second page of the table, and then I jumped to the other page to do something else and return back to the table, it should be staying on the second page of the table, but after implementing Bfullen's code( which solved my problem for saving the search value in the search input columns when returning to the page), it just doesn't work anymore.
The problem is likely doe to
all_book_types_table.draw();
on line 95. Thedraw()
will cause Datatables to display the first page. You can probably remove it or pass the parameterfalse
into thedraw()
API to stay on the same page, like this:Kevin
Thank you very much...it works! Xie xie