Search Text Cleared When Reloading

Search Text Cleared When Reloading

nnvtnnvt Posts: 0Questions: 1Answers: 0
edited November 2017 in Free community support

Hi there!

I have a few tables on my website and I'm having some issues with it. I have the following code to add a search box under every column:

$('#tblData tfoot th').each( function () {
    var title = $(this).text();
    if(title != "") {
        $(this).html( '<input type="text" placeholder="Search '+title+'" />' );
    }

} );
table.columns().every( function () {
    var that = this;

    $( 'input', this.footer() ).on( 'keyup change', function () {
        if ( that.search() !== this.value ) {
            that
                .search( this.value )
                .draw();
        }
    } );

I have also set statesave in the table to keep the settings on reload. The problem is, when I reload the page, the filter on the actual table remains but the search boxes are cleared. This requires me to type something in and clear it again to get the full table again.

I'm looking for something were either statesave ignores search filters or something where those search boxes don't get cleared. Does something like this exist?

This discussion has been closed.