[data grid] boolean headerFilter with option false
does not work
#15524
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
feature: Filtering on header
Related to the header filtering (Pro) feature
feature: Filtering
Related to the data grid Filtering feature
support: premium standard
Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Steps to reproduce
Steps:
Variant A
Variant B
Current behavior
cf. "Steps to reproduce" for easier traceability
Expected behavior
Clicking false or true should work correctly: Rows should be filtered by the selection and an x to reset the selection should be shown in both cases.
Context
I want to filter the rows by a boolean value.
As a workaround (or maybe hint/help to solve the problem?) I included my workaround where I use a singleSelect with
"true"
and"false"
as option and I stringify my booleans in the rows array. For the rendering of the checkmarks and crosses to be correct, a re-conversion of the stringified booleans viaJSON.parse()
is necessary. In my project I'm actually usingfilterMode="server"
, so I don't need to do this conversion because the boolean is correctly added to my backend query.Your environment
npx @mui/envinfo
Search keywords: DataGrid headerFilter boolean
Order ID: 95669
The text was updated successfully, but these errors were encountered: