My use case is to have a filter that shows “Choose One” and the values to choose from are the unique values in the column, e.g. choose between “Complete” and “Failed”.
I was able to get “Choose One” to show up just by using column_def["filterParams"] = {"filterOptions": ["empty"]}. Can I just add another item to the filterParams dict with a list of choices, or do I need to write a function in assets/dashAgGridFunctions.js that returns a list of strings?
The Set filters is an Enterprise feature. For the community version, if there are a limited number of choices, you could use the placeholder
"filterParams": {
"filterOptions": "contains",
"placeholder": "Complete or Failed"
},
Or you can use a custom component in the header using a checkbox or a dropdown. You can see an example with radio items here: Ag-Grid Custom Filtering - #14 by jinnyzor
Note - you need to use dash-ag-grid>=2.4.0