Individual column searching with default param returned empty result!

Individual column searching with default param returned empty result!

pws2018pws2018 Posts: 1Questions: 1Answers: 0

i try this code to set in footer for each column separated search input, it's work when i not set default param but is returned empty result when i set the default ordring and language! why?!

$(document).ready(function() {

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

     var table =$('#default_order').DataTable({
        "order": [
            [0, "desc"]
        ],
         "language": {
                        "url": "//cdn.datatables.net/plug-ins/1.10.15/i18n/Italian.json"
                        },

    });
    // Apply the search
        table.columns().every( function () {
            var that = this;

            $( 'input', this.footer() ).on( 'keyup change', function () {

                if ( that.search() !== this.value ) {
                    that
                        .search( this.value )
                        .draw();
                }
            } );
        } );
});

Answers

This discussion has been closed.