Showing default column search datatable
how to show default search field in datatable,
I tried this method, but it doesn't appear
$('#table').dataTable({
"searching": true
});
Replies (2)
Hi Jatinika.
Are you using the HTML version?
The default search DOM has been removed by default for the Metronic custom layout. You can check this file and look for the default DOM modification. You can remove this code block to make the datatable use the default DOM with the search input.
src/js/vendors/plugins/datatables.init.js
$.extend( true, DataTable.defaults, {
dom:
"<'table-responsive'tr>" +"<'row'" +
"<'col-sm-12 col-md-5 d-flex align-items-center justify-content-center justify-content-md-start'li>" +
"<'col-sm-12 col-md-7 d-flex align-items-center justify-content-center justify-content-md-end'p>" +
">",
renderer: 'bootstrap'
} );
Thanks
Ok thanks