0

I'm wondering how is it possible to clear a Filter using a Selector as used on the Interactive Demo for the Gender header.

4

1 回答 1

2

如果您询问如何向选择标题过滤器添加一个空选项,那么您只需要在headerFilterParams属性中包含一个具有空字符串值的属性:

{title:"Favourite Color", field:"color",   headerFilter:"select", headerFilterParams:{"":"", "red":"red", "green":"green"}}

如果要从表外部以编程方式触发它,则可以在列组件上调用setHeaderFilterValue

table.getColumn("color").setHeaderFilterValue("");
于 2018-10-10T06:19:32.777 回答