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.