Closed Crimsonpixie closed 4 months ago
Hi, I am sorry but v9 isn't supported anymore.
I will keep it open so others may help but I won't be able to assist with this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing the ticket as it's got no responses. Feel free to re-open.
I am using angular datatables in Angular 9. I am using different dtTriggers for both the tables.
<table id="incidentsTable" #incidentsTable class="table table-striped" datatable [dtOptions]="dtOptionsInc" [dtTrigger]="dtTriggerInc">
<table id="notificationsTable" #notificationsTable class="table table-striped" datatable [dtOptions]="dtOptionsNot" [dtTrigger]="dtTriggerNot">
But the issue is that when I use use pagination for the tables, the getPage() functions of both the tables are returning same page number.
` initializeSite() {
}
initializeNotificationStats(){
}
getNotPage(){
}
getPage() {
}`
The getPage() function is returning correct page number and pagination is working fine for it. But in case of getNotPage() function, I am getting the same page number as in getPage() function. Thats why pagination is not working for it. I tried to add dtElements and declare it.
@ViewChildren(DataTableDirective) dtElements: QueryList;
I used this function to return the correct page number but its not working.
getPage() { this.dtElements.forEach((dtElement: DataTableDirective) => { dtElement.dtInstance.then((dtInstance: DataTables.Api) => { // Do your stuff }); }); }