[DataGrid] Select inside cell doesn't trigger keyboard navigation when an item is selected via keyboard #2880
Closed
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!
Duplicates
Latest version
Current behavior 😯
Selecting an item with Enter doesn't close the Select and the focus is not moved to the correct cell.
Expected behavior 🤔
In https://v4.mui.com/components/data-grid/demo
It should move the focus to the cell underneath when an item is selected with Enter.
Steps to reproduce 🕹
It can be reproduced in https://mui.com/components/data-grid/demo/.
Context 🔦
This check is wrong: https://github.com/mui-org/material-ui-x/blob/998b4024d2793b673baa9f410e8b4c08c6dd7811/packages/grid/_modules_/grid/hooks/features/keyboard/useGridKeyboard.ts#L58-L60
When using MUI Core v4, a
keyDown
event fired by a Select has a fake target, which doesn't satisfy the above condition: https://github.com/mui-org/material-ui/blob/c545ccab7edfdf4a44d4ec2f4bf10ebc7fd00259/packages/material-ui/src/Select/SelectInput.js#L194In v5, it was changed to not override the original target, which made it to fall into the condition: https://github.com/mui-org/material-ui/blob/81578f0b52b469e0b0d2cb9df2ebf6820e05e6c6/packages/mui-material/src/Select/SelectInput.js#L269-L271
Flavien raised a similar issue in #2862 (comment).
Your environment 🌎
`npx @mui/envinfo`
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: