-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Focus leaves the datagrid #4201
Comments
This one is tricky. Comparing to cell editing:
Extending this to row editing, I would expect:
What do you think? |
In thinking about it further... In a lot of tables/grids in other applications when you tab after the last cell, the focus would move to the first cell on the next row. My gut instinct tells me that the user would likely expect this behavior. What about:
|
Did you test it on the new editing implementation @cherniavskii ? |
I pushed 35446f0 in #4060 fixing this behavior in the new API. Now it won't focus the next element in the tab sequence, only exit like in the cell editing.
The grid is treated as a "composite widget". In this case, only the active cell is included in the page tab sequence. To navigate between cells the arrow keys should be used. Here's one example from W3C: https://www.w3.org/TR/wai-aria-practices-1.2/examples/grid/dataGrids.html |
@m4theushw and @flaviendelangle I think that would not be very intuitive behavior. Basically, row editing turns the row into a form for the user. When users typically fill out forms, the tab key is used. Removing the existing behavior of tabbing between elements and replacing it with completely different functionality seems counter-intuitive and regressive. 😞 Some of the datagrids mentioned in other issues on the current roadmap as comparable to the functionality for that particular feature have row editing as well. See:
@oliviertassinari I tried to find the original issue written for this feature but was unsuccessful. Are we sure this is how this feature should be implemented? |
We're not replacing the current behavior. In the new API pressing Tab will always go to the next input and in the last input it will exit the edit mode. You can check the demo in the unreleased docs: https://deploy-preview-4060--material-ui-x.netlify.app/components/data-grid/editing/#row-editing There's still one small bug where it should move focus to the row below. We'll fix that. |
Ahh, thank you for the clarification. 👍 |
Duplicates
Latest version
Current behavior 😯
When
editMode="row"
pressing tab on the final field moves the focus out of the component and onto various browser objects like the refresh button or address bar.Expected behavior 🤔
The expected behavior would be one of any numerous possibilities including but not limited to:
Steps to reproduce 🕹
Steps:
editMode="row"
propContext 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: