MUI Data Grid - Create a filter for something that is not a column

67 Views Asked by At

I have a data grid, and for arguments sake, lets say it has 2 columns: name and age. With the filter (server side), i can filter on name and age with their operations.

But let's say I want to have a SingleSelect that says 'Can Drink' and 'Can't Drink'. Naturally I can just do a manual query that says 'age' 'gte' '21' but that's just for this example, the real world scenario is a touch more complex. It's basically to transform a statement into a collection of filters, think selecting "can do thing" -> [4-5 server side filters].

I thought about adding this status as a column and hiding it, but it would appear in the columns list, even if disabled, and may confuse users. Without having to rewrite the entire dang filter list panel, is there a good way to achieve this?

0

There are 0 best solutions below