dt propiedades jquery - DataTable: oculta el menú desplegable Mostrar entradas pero conserva el cuadro de búsqueda
5
Answers
language datatables pagination
¿Es posible ocultar el menú desplegable Mostrar entradas pero mantener el cuadro de búsqueda en DataTable? Quiero mostrar siempre 10 filas con la paginación en la parte inferior junto con el cuadro de búsqueda, pero no quiero mostrar el menú desplegable Mostrar entradas.
91 votes
datatable
sDom: "Tfrtip" o mediante una devolución de llamada:
"fnHeaderCallback": function(){
$('#YOURTABLENAME-table_length').hide();
}
datatable1
89
"searching": false, // Search Box will Be Disabled
"ordering": false, // Ordering (Sorting on Each Column)will Be Disabled
"info": true, // Will show "1 to n of n entries" Text at bottom
"lengthChange": false // Will Disabled Record number per page
datatable2
88
Para ocultar "mostrar entradas" pero aún tiene paginación. Usé el código a continuación y funcionó.
"bPaginate": true,
"bLengthChange": false,
"bFilter": true,
"bInfo": false,
"bAutoWidth": false
datatable3
87
Puedes probar esto también.
simplemente ocúltalo de CSS usando,
.dataTables_length {
display: none;
}
Ambos funcionarán.
datatable4
86