Look at using the textCustomComparator
option, documented here: https://www.ag-grid.com/javascript-grid-filter-text/#text-custom-comparator
Here is an example of how it could be accomplished:
filterParams: {
filterOptions: ["contains"],
textCustomComparator: function(filter, value, filterText) {
// get array of comma separated values
const filterValues = filterText.split(',');
// loop through filterValues and see if the value contains any of them
return filterValues.some((item) => {
return value.indexOf(item) >= 0;
});
}
}
Another option is to use a custom filter, which is documented here: https://www.ag-grid.com/javascript-grid-filter-custom/