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?
Enable filtering by setting grid property enableFilter=true. This turns on filtering on all columns. To turn off filtering for particular columns, set suppressFilter=true on the individual column definition.
Configuring Filters on Columns Set filtering on a column using the column definition property filter . The property can have one of the following values: boolean : Set to true to enable the default filter. The default is Text Filter for AG Grid Community and Set Filter for AG Grid Enterprise.
The Clear button clears just the filter UI, whereas the Reset button clears the filter UI and removes any active filters for that column. The Cancel button will discard any changes that have been made in the UI, restoring the state of the filter to match the applied model.
I just needed to set an "empty" function as "getQuickFilterText" function for the column I don't want to search through:
colDef = {
getQuickFilterText: () => ''
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With