Issue: after refresh then paginate, the datatable is disappeared
Issue: after refresh then paginate, the datatable is disappeared
Hello developers, I'm using datatable with option false for paginating, and instead, I used bootstrap pagination to handle server-side data
My problem is when I refresh the window then paginate the datatable disappeared!
I tried to use this $("#datatable").DataTable().ajax.reload(); but the issue still exists. I checked all previous discussions of disappearing table and try the posted solution(like clear and destroy the table then initiate it again) but nothing works with my scenario
also, I tried this but didn't work too
//check for the page is reloaded or not.
if (performance.navigation.type == 1) {
if ($.fn.dataTable.isDataTable(".datatable")) {
let table = $(".datatable").DataTable();
table.ajax.reload();
}
}
this is the how I define the datatable
<table class="datatable hover row-border"
datatable="ng" dt-options="dtOptions"
dt-columns="dtColumn"
>
this is how I define the options
$rootScope.dtOptions = DTOptionsBuilder.newOptions()
.withOption("searchHighlight", true)
.withOption("processing", true)
.withOption("responsive", true)
.withOption("paginate", false)
.withOption("info", false);
Any help, please...
Replies
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin