I'm filtering my table with an input and am wanting to reset the table to the first page whenever the filter is updated. Right now the table shows and the filtering works but the table page doesn't reset.
Here is what I have to far:
Table:
<ngx-datatable
class='material'
[rows]='rows'
[columns]="columns"
[columnMode]="'standard'"
[headerHeight]="75"
[footerHeight]="50"
[scrollbarH]="true"
[rowHeight]="'auto'"
[limit]="5"
[selectionType]="'multiClick'"
[offset]="tableOffset"
>
</ngx-datatable>
Relevant TS:
tableOffset = 0;
updateFilter(event, seachCriteria) {
// Filtering Process...
// Whenever the filter changes I want to go back to the first page
this.tableOffset = 0;
}
Any pointers to where I'm going wrong?
EDIT So I tried setting the offset to 1 and found that resetting with this.tableOffset = 0; did work but whenever I used the arrows to navigate to a different page it will prevent that reset from taking place.
Is this a bug or am I missing something?