Don't Save Search State
Don't Save Search State
mkoenig
Posts: 4Questions: 0Answers: 0
How do you go about not saving the search field. I want it to save sort, and item per page preferences, but not the searched data.
This causes an issue.
Thanks Datatables!
This causes an issue.
Thanks Datatables!
This discussion has been closed.
Replies
Allan
I added the data to the current script and it now reads
[code]
$(document).ready(function() {
dTable = $('#example').dataTable( {
"bStateSave": true,
"fnStateLoadParams": function (oSettings, oData) {
oData.oFilter.sSearch = "";
}
} );
} );
[/code]
But this removes the searchbox and all the filtering/sorting.
I upgraded to beta 1.9 of course :)
Any idea?
It looks like it should be working to me :-)
Allan
Ok, well i guess ill just wait for the full release no big deal. I really like the software :)
Another poster recommended this:
There is a plugin that clears the DataTable filter here fnFilterClear
http://datatables.net/plug-ins/api
....and it worked for me - using the latest version of Datatables and the plugin.