I am using angular2 with primeng2, pagination is not properly working on dataTable lazyLoad, If click on the specific page or next button it's making API call and getting the response from server but dataTable is not updating immediately
if we click somewhere in the grid it will get updated
If I want to reload the dataTable using reset also not working for me
this.datasource = result;
this.datasource.merchants = result.merchants.slice();
/*datasource is an instance of MerchantDto {
totalCount: number = 0;
merchants: any = [];
}*/
HTML CODE:
<p-dataTable #dataTable [loading]="loading" loadingIcon="fa-spinner" [value]="datasource.merchants" [rows]="perPage" *ngIf="datasource"
[paginator]="true" [pageLinks]="5" [lazy]="true" [totalRecords]="datasource.totalCount" (onLazyLoad)="loadLazyData($event)">
......
</paginator>
any idea on this issue
EDIT upgrading to next version might resolve this issue but I want to work on angular2 with primeng2