Searches come up with null as the value that shows in the search box when I go back to my search pag
Searches come up with null as the value that shows in the search box when I go back to my search pag
dsanderson
Posts: 3Questions: 0Answers: 0
For some reason searches are showing null in the search field on my databable page. Not sure what is causing this but it doesn't happen all the time. It's very difficult to reproduce so I'm not sure where to even begin. I've uploaded my code as a debug at http://debug.datatables.net/aqelod. Not sure exactly where to go from here or what my problem could be.
This discussion has been closed.
Replies
[code]
fnStateLoadParams": "function (oSettings, oData) {
if (typeof oData.oFilter != \"undefined\") {
$(\"#fkCategory\").val(oData.oFilter.keyCategory);
$(\"#nsApprovalStatuses\").val(oData.oFilter.sStatusFilter);
}
}
[/code]
What you want to just do `if ( oData.oFilter )` rather than checking for it being undefined? Or perhaps also checking that `sStatusFilter` and `keyCategory` are defined and not null? Is it those filters that are showing the problem, or the DataTables core filter?
Allan
Allan