1
我正在使用输入过滤我的表,并且希望在更新过滤器时将表重置为第一页。现在表格显示和筛选工作,但表格页面不重置。NGX Datatable - 使用函数重置偏移
这是我不得不远:
表:
<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>
相关TS:
tableOffset = 0;
updateFilter(event, seachCriteria) {
// Filtering Process...
// Whenever the filter changes I want to go back to the first page
this.tableOffset = 0;
}
任何指针我要去错在何处?
EDIT 所以,我试图设置偏移为1,并发现用this.tableOffset = 0复位;确实有用,但是每当我使用箭头导航到不同的页面时,它都将防止发生重置。
这是一个错误还是我错过了什么?