在我的NG2智能表中,我使用了内置的列过滤器来过滤数据。每当过滤数据时,我总是希望将页面设置为第一个。例如,当数据加载到表中时,我导航到第10页,并使用内置的列过滤器进行搜索。我想从第一页看到结果,而不是最后一页。我如何实现它?请给我引路。
发布于 2020-10-10 21:41:44
我用以下代码做到了这一点:
ResetTable () {
this.source.reset(true);
this.source.setPage(1, false);
let filterArr = this.getFilterArray(); // customer method to update my filter
if (filterArr.length)
this.source.setFilter(filterArr, false, false); // set the new filter
this.source.refresh();
}https://stackoverflow.com/questions/63110606
复制相似问题