Code: Select all
<p-table (onLazyLoad)="onFetch($event)"
[lazy]="true"
[lazyLoadOnInit]="false"
[(selection)]="selectedItems"
[columns]="columns"
[currentPageReportTemplate]="pageReportTemplate"
[showCurrentPageReport]="true"
[filterDelay]="0"
[loading]="loading"
[paginator]="true"
[resetPageOnSort]="false"
[rowsPerPageOptions]="rowsPerPage"
[rows]="rowsPerPage[0]"
[totalRecords]="itemsCount"
[value]="items"
[(first)]="currentPage"
#table
</p-table>
Code: Select all
selectSecondPage(): void {
this.curretPage = 2;
}
Code: Select all
this.table.first = 2;
this.table.firstChange.emit(2);
this.table.onLazyLoad.emit(this.table.createLazyLoadMetadata());