-
Notifications
You must be signed in to change notification settings - Fork 10
Description
The Excel-like filter row propagates the values that can be selected in the combobox with the distinct list of all values available in a column. If the values in the column are collections, for example the favouriteFood column in the NatTable examples, the values in the filter combo are actually all different collections that are found. So you are able to filter for the exact collection, but you are not able to filter for all table items that contain the same values in the collections.
It would be good if it could be configurable if the collection values in a column should be "flattened", so it is possible to filter out table rows that contain a single value instead of the whole collection.
For example, if the following favouriteFood values are in the table:
[ Pizza, Pasta ]
[ Burger, Fries ]
[ Pasta, Fries ]
The filter combobox will contain exactly these three entries. If you want to find all entries that contain Pasta you need to find all entries in the combo that contain Pasta.
By flattening the value collections, the filter combo contains the following values:
Burger
Fries
Pasta
Pizza
By selecting Pasta you should see all table rows that have either [ Pizza, Pasta ] or [ Pasta, Fries ] as favouriteFood.
Additionally it would be good to support a custom map function, to allow developers to map for example string values to a collection. For example, in the column values a value collection is stored as a string like "One,Two,Three". Providing a custom map function this could be treated as a collection on collecting the values for the filter combobox.