Disabling search and ordering on individual column searching table(select inputs)

Disabling search and ordering on individual column searching table(select inputs)

f4sethf4seth Posts: 3Questions: 2Answers: 0
edited July 2018 in DataTables

I am attempting to remove the search functionality and the ordering on my individual column searching table. I am not seeming to have any luck. Does anybody know how I disable this functionality from the following code?

$(document).ready(function() {
    $('#example').DataTable( {

        initComplete: function () {

            this.api().columns().every( function () {

                var column = this;
                var select = $('<select><option value=""></option></select>')
                    .appendTo( $(column.footer()).empty() )
                    .on( 'change', function () {
                        var val = $.fn.dataTable.util.escapeRegex(
                            $(this).val()
                        );
                        
                        column
                            .search( val ? '^'+val+'$' : '', true, false )
                            .draw();
                    } );
                  


                column.data().unique().sort().each( function ( d, j ) {
                    select.append( '<option value="'+d+'">'+d+'</option>' )
                } );
            } );
        }

    } );

} );

Answers

This discussion has been closed.