Colleagues, I initialized the datatable to show no information, and put a click event to display the details of each row. However, when you click on this event, the datatable is modified and the details are displayed, such as "Show 10 entries", "Search", "Previous / Next". How do you keep this information hidden?
Initialization:
minha_table = table.dataTable({
aaSorting: [],
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
iDisplayLength: 10,
processing: false,
serverSide: false,
searching: false,
bPaginate: false,
bInfo:false
});
Click function:
$(document).on("click",'.minha_classe',function (e) {
e.preventDefault();
var api = $('#tabela').dataTable().api();
var tr = $(this).closest('tr');
var row = api.row( tr );
if ( row.child.isShown() ) {
// This row is already open - close it
row.child.hide();
tr.removeClass('shown');
}
else {
// Open this row
row.child( format(row.data()) ).show();
tr.addClass('details');
tr.addClass('shown');
}
});
Does anyone know how to solve it?