The select option is not sorted in ascending order, How to sort it as number not as string please see the attached image
initComplete: function() {
this.api().columns([0, 1, 2, 3, 4]).every(function() {
var column = this;
var select = $('<select onclick="event.stopPropagation()" class="form-select form-select-sm"><option value="">All</option></select>')
.appendTo($(column.header()))
.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) {
if (d != null) {
select.append('<option value="' + d + '">' + d + '</option>')
}
});
});
},