I'm using primeng datatable on my project as the logic i'm using two datatables 1. lazyload while page loading here service data have pagination and 2. another one for filter by category here service data have now pagination
I want to export the data in CSV file single datatable works fine but here not works
<button (click)="dt.exportCSV()">Export</button>
in datatable
<p-dataTable [value]="complaintList" [lazy]="true" #dt> </p-dataTable>
<p-dataTable [value]="complaintList" [rows]="20" #ds></p-datatable>
your ng derective in second table is #ds, should be common with your export button's click method event ,is #dt