是否可以在 ag-grid 中打开和关闭自定义浮动过滤器? [英] Is it possible to open and close a custom floating filter in ag-grid?

查看:31
本文介绍了是否可以在 ag-grid 中打开和关闭自定义浮动过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 ag-grid 中打开和关闭或显示和隐藏自定义浮动过滤器,例如,如果单击了按钮?
如果您初始化表格,则只有标题应该是可见的.然后在点击特定按钮后,标题下方的浮动过滤器也应该可见.

Is it possible to open and close or to show and hide custom floating filters in ag-grid, for example if a button was clicked?
If you initialize the table, only the header should be visible. Then after a specific button was clicked, also the floating filters below the header should be visible.

推荐答案

试试这个:

gridOptions.floatingFilter = !gridOptions.floatingFilter;
gridOptions.api.refreshHeader();

这篇关于是否可以在 ag-grid 中打开和关闭自定义浮动过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆