SaveState set to true, how can i read the active filter ?
SaveState set to true, how can i read the active filter ?
bartdereu
Posts: 10Questions: 5Answers: 0
I want to put the active filter in my input box, and make the user clear that the table has been filtered.
I tried
"stateLoadCallback": function (settings, callback) {
console.log(settings);
$('#form-search-input').val(settings.oSavedState.search.search);
}
The settings object gives me the value in settings.oSavedState.search.search, but when i
try to set my input , the settings.oSavedState is null..
strange ! any ideas?
This discussion has been closed.
Answers
Hi @bartdereu ,
We're happy to take a look, but as per the forum rules, please link to a test case - 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
I have been trying to figure out how to get my code in between code tags, thanks for the guidance.
I think you want to use
stateLoadParams
notstateLoadCallback
. For example:http://live.datatables.net/vimejinu/1/edit
Kevin
This works perfect ! Thanks allot !!!