【发布时间】:2023-03-06 18:08:01
【问题描述】:
我试图在我更改过滤器/在 ag 网格上应用过滤器时收到通知。下面是我尝试过的代码。
在我的 component.html 中我添加了(filterChanged) = 'filterChanged($event)' .
在component.ts我的代码如下,
filterChanged(params){
this.params =params;
this.gridApi = params.api; // To access the grids API
this.gridColumnApi = params.columnApi;
var filterInstance = this.gridApi.filterManager.allFilters;
alert("Filter applied"+filterInstance);
}
但是在警报中,我得到的是对象对象,不知道为什么会这样。谁能帮忙解决这个问题。
我参考了以下链接 -
【问题讨论】: