[data-grid] Support for filtering of array values #6174
Labels
component: data grid
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
Duplicates
Latest version
Summary 💡
We have a use case for displaying rows where an individual column might contain an array of values, like tags, categories etc. We want to be able to filter the grid by these values, so if a record has tags of
["tag1", "tag2"]
then I should be able to use the is, not, isAnyOf operators to filter for these.The provided column types don't support this out of the box. The closest is the singleSelect column type, but that only works with single values, not arrays.
I know that when we start looking at array values, matching logic does get more nuanced, and the value is just as likely to be something like
[{id: 1, tag: "tag1"}, {id: 2, tag: "tag2"}]
as it is to be a flat string, which wouldn't work with a generic matcher, but still the flat string case could be common enough to warrant internal support.If this is something the community feels is a common enough case to add value I'd happily raise a PR to add a "multiSelect" column type. The operators would look like the below:
Examples 🌈
Expected behaviour:
Motivation 🔦
No response
Order ID 💳 (optional)
45574
The text was updated successfully, but these errors were encountered: