bStateSave doesn't restore inputs

bStateSave doesn't restore inputs

pmethpmeth Posts: 1Questions: 0Answers: 0
edited February 2012 in General
i have a datatable with column filters and search. I tried setting bStateSave : true. When I leave the page and return to it, it seems to keep the state of the table ok, but the filters and search box are empty. Is there any way to restore them to the values they had before?

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    I presume you've added column filters? The thing to remember is that the column filter input are completely outside the control of DataTables - they are an input to the table, not an output, so DataTables has no idea that they exist, never mind how to populate them with values. So if you are using column filters you'll need to populate them as required with the saved values - this can be done with the fnStateLoaded callback function.

    Allan
This discussion has been closed.