DataTables ajax.reload() loses page
$(document).ready(function() {
$('#table_id').DataTable( {
stateSave: true
} );
});
Anyone who are using jQuery DataTables and wants to perform tasks e.g. reload the page, or edit, delete, will face a problem to lose the current page and navigate to 1st page, this snippet will help him to stay on the same page, It avoids to return from current page to first page.
You need to pass parameters for keeping current page like:
datatable_appointments.ajax.reload( null, false )
source: https://datatables.net/reference/api/ajax.reload()