sort select
sort select

Hello,
I want to reduce the results of each select as and when the selections remove the results not available. I can't do it !! can you help me thank you
function (){
this.api().columns([3,4,5,6,7,8,9,10,11]).every( function (){
var column = this;
var select = $('<select class="form-control selectpicker show-menu-arrow form" data-live-search="true"><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>' )
});
});
}
This discussion has been closed.
Replies
See this example from this thread - it's doing just that,
Colin