Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

248
Visualizações
How to prevent pagination reset in datatable using global configuration?

How to stay on the same page of datatables after data changes when the table is reloaded? I've managed to persist datatable state after page refresh globally using

$.extend(true, $.fn.dataTable.defaults, {
    "bStateSave": true,

in plugins/datatables/plugins/bootstrap/datatables.bootstrap.js. BTW, is it a good solution to modify the code of the plugin itself?

But the datatable keeps resetting after I modify any row. Then I've managed to persist the page using table.ajax.reload(null, false). My goal is to apply this behaviour globally in the project without modifying each of the pages (there are about 700 occurences of table.ajax.reload() in the project). Adding

$.extend(true, $.fn.dataTable, {
  "ajax": {
      "reload": {
          "callback": null,
          "resetPaging": false
        }
    }
});

in plugins/datatables/plugins/bootstrap/datatables.bootstrap.js haven't done the trick.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda