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

[data grid] The grid crashes when it enters into edit mode if any of it's columns is of type "single select" #15939

Open
krishna-vithal opened this issue Dec 19, 2024 · 2 comments
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Editing Related to the data grid Editing feature support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@krishna-vithal
Copy link

krishna-vithal commented Dec 19, 2024

Steps to reproduce

When implementing the edit functionality in the DataGridPremium and using a column with the singleSelect type (such as a dropdown), an issue arises where, upon entering edit mode, this column automatically receives focus. As a result, the user is forced to make a selection in this dropdown before they can interact with other controls or fields in the grid.

This behavior can be frustrating for users because it restricts their ability to freely navigate and interact with other cells without first interacting with the dropdown. It forces the user to make a choice in the singleSelect field, even if they don't intend to change the value, disrupting their workflow.
Steps:

  1. Open this link to live example: (required)
  2. Click on Edit(Pencil Icon) button on any of the row.

Current behavior

As soon as row enters into edit mode drop down automatically shows up and until any of the option is selected user is not allowed to anything else.

Expected behavior

Row should be entered into edit mode and dropdown shouldn't open until user clicks on it.

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: Edit DataGridPremium

Order ID: 89881

@krishna-vithal krishna-vithal added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 19, 2024
@github-actions github-actions bot added component: data grid This is the name of the generic UI component, not the React module! support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ labels Dec 19, 2024
@michelengelen
Copy link
Member

Hey @krishna-vithal ... if you intend to use row editing you need to set editMode="row" as a prop on the DataGrid. Docs reference: Row editing

Should we maybe add a warning when a controlled rowModesModel is being used without setting editMode="row" @mui/xgrid ?

@michelengelen michelengelen changed the title DataGridPremium crashes when it enters into edit mode if any of it's column has "single select" as it's type. [data grid] The grid crashes when it enters into edit mode if any of it's columns is of type "single select" Dec 19, 2024
@michelengelen michelengelen added feature: Editing Related to the data grid Editing feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 19, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Dec 19, 2024
@krishna-vithal
Copy link
Author

Thank you! It's working if I set editMode="row" and yes it would be helpful if you add that as warning.

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! feature: Editing Related to the data grid Editing feature support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

2 participants