Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

80
Vistas
Disable "Entries Per Page" Dropdown -- Bootstrap Table

I want to disable the "Entries per page" dropdown and the search bar.

I saw the below codes (BLOCK 1) in the documentation, but I don't think I understand how to implement those in my current script (BLOCK 2). I tried what I could, it didn't work.

/* BLOCK 1 */

$(document).ready(function () {
  $('#dtBasicExample').DataTable({
    "ordering": false // false to disable sorting (or any other option)
  });
  $('.dataTables_length').addClass('bs-select');
});

/* BLOCK 2 */

window.addEventListener('DOMContentLoaded', event => {
  // Simple-DataTables
  // https://github.com/fiduswriter/Simple-DataTables/wiki

  const datatablesSimple = document.getElementById('datatablesSimple');
  if (datatablesSimple) {
    new simpleDatatables.DataTable(datatablesSimple, {
      perPage: 1,
    });
  }
});
7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos