Consider a column in ag-grid that can only have one of two values, "Yes" and "No" as strings.
ag-grid has a built in column filter that shows all distinct values of that column with checkboxes.
This filtering works great with user interaction, but I need to filter out the rows with "No" values prior to first render, without user interaction.
I can accomplish the desired filtering via the use of
gridOptions.isExternalFilterPresent
gridOptions.doesExternalFilterPass
However, when the user clicks the filter button they only see options for values that are currently in the column, not all possible values.
The problem is that the user may not even know that "No" is a possible option and will not know what that the grid is currently filtered.
I believe in order to help with this scenario, you supply all possible values can specify for the filter as filterParams below:
{
headerName: 'ETF',
field: 'isEtf',
filterParams: {
values: ['Yes', 'No'],
suppressRemoveEntries: true
}
}
When I supply values
the grid will show both checkboxes, but it is not accurate as all "No" values have been filtered out and should have an un-checked checkbox next to the "No" option.
Setting true for suppressRemoveEntries
seems to have no effect even though its description seems to suggest that this would address my issue.
Is there a way to control the state of the checkboxes programmatically or to have the grid reset/recognize current filter options against possible values supplied in filterParams.values
after my external filter is applied?