[DataGrid] singleSelect
filtering doesn't work for object values without value
property
#9026
Open
2 tasks done
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
customization: extend
Logic customizability
feature: Filtering
Related to the data grid Filtering feature
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/damp-shadow-xemby7?file=/demo.tsx
Steps:
country2
column usingis
operator andAndorra
valueCurrent behavior 😯
No rows displayed
Screen.Recording.2023-05-17.at.19.44.15.mov
Expected behavior 🤔
The rows with
Andorra
value displayedContext 🔦
I noticed this while reviewing DataGrid + Joy UI demo for the workshop.
The problem is reproducible only when:
value
propertyIn the demo, the
country1
column works as expected, becausevalueOptions
and the cell value have thevalue
property.In #7684 we added support for
getOptionValue
, but apparently we missed something.The issue is probably here:
mui-x/packages/grid/x-data-grid/src/colDef/gridSingleSelectOperators.ts
Lines 6 to 11 in df2113b
We should use
getOptionValue
here instead of the hardcoded.value
Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: