I want to set several settings to my DataTable:
$('#table').DataTable({
"lengthMenu": [[6, 10, 15], [6, 10, 15]],
"order": [[ 2, "desc" ]],
"scrollX": true,
"scrollY": 200
} );
But this:
$('#table').DataTable({
"lengthMenu": [[6, 10, 15], [6, 10, 15]]
});
or that:
$('#table').DataTable({
"order": [[ 2, "desc" ]]
})
is working but It seems order is prioritized because it is set correctly. (Also If the lengthMenu is only set it works) but set like in the first code it just orders the data and no menu is shown. Someone got an idea?
EDIT: If I order in like this only ordering of column is done -> the opposite just does the lengthMenu:
$.extend( $.fn.dataTable.defaults, {
"order": [[ 2, "desc" ]]
} );
$('#entity_type_table').DataTable({
lengthMenu: [[6, 10, 15], [6, 10, 15]]
} );