关于筛选结果的mfBootstrapPaginator索引问题

时间:2018-07-24 14:48:57

标签: angular typescript bootstrap-4 pipe

我有一个带有mfBootstrapPaginator的网格

 <tfoot> <tr> <td colspan="8">
        <mfBootstrapPaginator></mfBootstrapPaginator></td></tr>   </tfoot>

enter image description here

每当我分页时,相应的数组将在每次单击时获取该页面的数组项。

enter image description here

但是我的问题是,每当我在网格中执行搜索(过滤器)时,过滤器记录都将保留在数组中的相同位置。因此,当我分页时,这些项目将散布在不同的页面上,而不是排序到第一页。

ngOnInit(){    this.getAddServer(); }

getAddServer() {
        this.AddServerService.getAddServer()
            .subscribe(res => {
                this.addservers = res;
                this.total = this.addservers.length;
            });
    }

enter image description here

我正在使用从'ng2-search-filter'导入的{Ng2SearchPipeModule};使用搜索框过滤网格。

enter image description here

0 个答案:

没有答案