How to turn off ag-grid quick filter for specific column

前提是你 提交于 2019-12-13 17:02:13

问题


AG-grid has "quick filter" feature, essentially a free-text search filter that searches through all columns. The problem is, in some columns, I have date-time values and I don't want to search through data in those columns.

Using "column filter" to filter on each column separately is not an option because this will give me "AND" behavior: only when all columns that I search through contain the data I search for will this column be visible. And I need "OR" behavior: a row that contains the data I search for in any column (except column that has date-time values) should be visible.

So, how can I remove some columns from the set of columns this "quick filter" searches through?


回答1:


I just needed to set an "empty" function as "getQuickFilterText" function for the column I don't want to search through:

colDef = {
    getQuickFilterText: () => ''
}


来源:https://stackoverflow.com/questions/52041955/how-to-turn-off-ag-grid-quick-filter-for-specific-column

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!