"sDom": "t<'row'<'col-md-12'p>>", and dataTables_filter
"sDom": "t<'row'<'col-md-12'p>>", and dataTables_filter
I have the following javascript code:
$(document).ready(function(){
$('#subset').dataTable({
"dom": "t<'row'<'col-md-12'p>>",
"displayLength": 12,
"info": false,
"lengthChange": false,
"order" : [],
"columnDefs": [
{ "orderable": false, "targets": [3, 4, 5] }
]
});
});
The problem is that "dom": "t<'row'<'col-md-12'p>>", causes the dataTables_filter
to not be rendered. When I remove "t<'row'<'col-md-12'p>>" the _filter part
is being rendered, but the pagination part becomes to small.
I am using dataTables 1.10.12 I hope there is a solution to solve this problem.
Kind regards,
Annet V.
Answers
If you want the default search input to show then you need to add the
f
option to thedom
. Here is the Bootstrap example:https://datatables.net/reference/option/dom#Styling
Kevin