Why does my datatable reload where I change length or start typing in filter input box?

Why does my datatable reload where I change length or start typing in filter input box?

ebrunolopesebrunolopes Posts: 1Questions: 1Answers: 0

var tables = $.fn.dataTable.fnTables(true);
$(tables).each(function() {
$(this).dataTable().fnDestroy();
});
$('#tableoutrequisicoes').dataTable( {
"dom": "<'row'<'col-md-8 col-sm-12'l><'col-md-4 col-sm-12'>f><'table-scrollable't><'row'<'col-md-8 col-sm-12'i><'col-md-4 col-sm-12'p>r>", // datatable layout
"lengthMenu": [
[20, 50, 100, 150, -1],
[20, 50, 100, 150, "Tudo"]
],
"processing": true,
"serverSide": true,
"pageLength": 20,
"ajax": {
"type": "POST",
"url": Paths.init('units') + 'armazem/renderrequisicoes',
"data": function ( d ) {
d.query = $('#query').val();
d.reftipo = $('#rowsysdocumento').val();
d.serie = $('#serie').val();
d.numero= $('#numero').val();
}
},
"columnDefs": [
{
"targets": [0],
"visible": false,
"searchable": false
}
],
"order": [
[1, "asc"]
]
} );

This discussion has been closed.