Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGrid] Fix focus when selecting option with Enter in the singleSelect #3220

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

m4theushw
Copy link
Member

Fixes #2880

The solution is a hack involving manually publishing cellNavigationKeyDown to trigger the keyboard navigation. Another alternative would be to call setCellFocus, but it's too cumbersome to compute the next id to focus on. The best thing to do would be to not ignore events coming from a portal and adopt a solution like #3158 (comment). I'll not do this for now because it may cause regressions.

@m4theushw m4theushw added component: data grid This is the name of the generic UI component, not the React module! bug 🐛 Something doesn't work labels Nov 19, 2021
@m4theushw m4theushw self-assigned this Nov 22, 2021
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 27, 2021
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 30, 2021
@m4theushw m4theushw merged commit 37a5c42 into mui:master Dec 1, 2021
@m4theushw m4theushw deleted the fix-focus-single-select branch December 1, 2021 14:19
alexfauquette added a commit to alexfauquette/mui-x that referenced this pull request Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] Select inside cell doesn't trigger keyboard navigation when an item is selected via keyboard
2 participants