I'm using datatables to show my data from db. The problem is the datatables only shows 15 data, even though I already add a new data, it will only shows 15 data and in the db itself there are more than 15 data. Why my datatables only show 15 data?
Here is my code:
$('#tabelpekerjaan').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true,
"responsive": true,
initComplete: function(){
this.api()
.columns([0])
.every(function(){
var column = this;
var select = $('<select><option value="">Semua</option></select>')
.appendTo('#tahun')
.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>');
});
$( select ).click( function(e) {
e.stopPropagation();
});
});
}
});
I have already tried suggestion from this post that I've found, Datatables only shows 15 when I have 60 , but it doesn't work...