Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!