I am using PrimeNG Turbotable <p-table #dt
.
According this dt.reset()
will reset sort, filter and paginator state.
I am trying to find a way to reset paginator state and reload table data. (without the sort state reset)
This should happen on (click)
of that button
<p-button icon="fa fa-refresh" (click)="refresh()"></p-button>
How can I achieve that ?
In .html file -
<p-table #dt [columns]="cols" [value]="result" [paginator]="true" [rows]="10" [(first)]="first">
Don't forget the brackets in [(first)]
In .ts file, Add first attribute :
first = 0
wherever you want to reset, call below mentioned refresh function
refresh() {
this.first = 0;
}