如何以字符串形式获取 Ag-Grid 的过滤值

问题描述 投票:0回答:1

enter image description here

我有上面的列 api 数据,我想使用 agGridColumnApi?.api?.filterManager?.allFilters 从中获取应用的过滤值作为字符串,但结果未定义。

我有上面的列 api 数据,我想使用 agGridColumnApi?.api?.filterManager?.allFilters 从中获取应用的过滤值作为字符串,但结果未定义。

ag-grid pdfmake
1个回答
0
投票

通常我们使用

getFilterModel
从aggrid获取所有过滤器,
filter api here

的文档
// Gets filter model via the grid API
const model = api.getFilterModel(); 

// Sets the filter model via the grid API
api.setFilterModel(model);
© www.soinside.com 2019 - 2024. All rights reserved.