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

[MUI Data Grid] Row group row moves to the end of group when row data is updated #8853

Closed
2 tasks done
sagarchoudhary96 opened this issue May 3, 2023 · 1 comment · Fixed by #8823
Closed
2 tasks done
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Row grouping Related to the data grid Row grouping feature plan: Premium Impact at least one Premium user regression A bug, but worse

Comments

@sagarchoudhary96
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/loving-wilson-55r2oy?file=/demo.tsx
Screenshot 2023-05-03 at 10 57 16 PM

Steps:

  1. try to edit a row column when grouped.

Current behavior 😯

The row being edited moves to the bottom of the group.

Expected behavior 🤔

The row index should be preserved and be at same place.

Context 🔦

When having a large set of data and trying to visualise with grouping enabled, and editing data, This current behaviour of moving the edited row to the bottom in the group makes it difficult to know the edited row and for the user to find that row as they lose context and expects the row to stay at the same position.

Your environment 🌎

npx @mui/envinfo
  System:
    OS: macOS 13.3.1
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  Browsers:
    Chrome: 112.0.5615.137
    Edge: Not Found
    Firefox: Not Found
    Safari: 16.4
  npmPackages:
    @emotion/react: ^11.10.6 => 11.10.6
    @emotion/styled: ^11.10.6 => 11.10.6
    @mui/base:  5.0.0-alpha.121
    @mui/core-downloads-tracker:  5.11.13
    @mui/material: ^5.11.13 => 5.11.13
    @mui/private-theming:  5.11.13
    @mui/styled-engine:  5.11.11
    @mui/system:  5.11.13
    @mui/types:  7.2.3
    @mui/utils:  5.11.12
    @mui/x-data-grid:  6.0.1
    @mui/x-data-grid-premium: 6.0.1 => 6.0.1
    @mui/x-data-grid-pro:  6.0.1
    @mui/x-date-pickers: ^6.0.1 => 6.0.1
    @mui/x-license-pro:  6.0.1
    @types/react: 18.0.24 => 18.0.24
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    styled-components:  5.3.6
    typescript: ^4.8.4 => 4.8.4

Order ID or Support key 💳 (optional)

55516

@sagarchoudhary96 sagarchoudhary96 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 3, 2023
@cherniavskii
Copy link
Member

Hi @sagarchoudhary96
This looks like another symptom of #8580

I've forked your demo and tried to use the version of the data grid from the PR that is supposed to fix the linked issue and it seems to be fixed:
https://codesandbox.io/s/frosty-bassi-1hwexf

Note, that the row can still be moved after editing if sorting is applied to the grid.

@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! regression A bug, but worse feature: Row grouping Related to the data grid Row grouping feature plan: Premium Impact at least one Premium user and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Row grouping Related to the data grid Row grouping feature plan: Premium Impact at least one Premium user regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants