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

dsandersondsanderson Posts: 3Questions: 0Answers: 0
edited February 2013 in General
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.

Replies

  • allanallan Posts: 63,107Questions: 1Answers: 10,394 Site admin
    I'm guessing that it is related to your override of the state saving parameters:

    [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
  • dsandersondsanderson Posts: 3Questions: 0Answers: 0
    That's just what I needed. Thanks!
  • dsandersondsanderson Posts: 3Questions: 0Answers: 0
    Actually... I spoke too soon. I figured out my problem. The folks having issues are using the google toolbar. If I install google toolbar, I start having this issue. What would be causing that? It doesn't happen on IE without Google toolbar or on Chrome.
  • allanallan Posts: 63,107Questions: 1Answers: 10,394 Site admin
    Absolutely no idea I'm afraid. Sounds like it falls outside the scope of DataTables, particularly if it is in your custom filtering, rather the DataTables core filtering.

    Allan
This discussion has been closed.