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] deleted row is not removed from rowSelectionModel #14964

Closed
tillkrischer opened this issue Oct 14, 2024 · 3 comments · Fixed by #14972
Closed

[data grid] deleted row is not removed from rowSelectionModel #14964

tillkrischer opened this issue Oct 14, 2024 · 3 comments · Fixed by #14972
Assignees
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Selection Related to the data grid Selection feature regression A bug, but worse

Comments

@tillkrischer
Copy link

tillkrischer commented Oct 14, 2024

Steps to reproduce

Link to live example: https://codesandbox.io/p/sandbox/vigorous-oskar-rhgzlp

Steps:

  1. select row with checkbox
  2. delete that row
  3. row remains in rowSelectionModel despite keepNonExistentRowsSelected={false}

Current behavior

  • onRowSelectionModelChange does not get called
  • the deleted row id stays in rowSelectionModel

Expected behavior

  • onRowSelectionModelChange gets called and removes the deleted row id
  • like 7.18.0

Context

No response

Your environment

npx @mui/envinfo
  System:
    OS: Windows 11 10.0.22631
  Binaries:
    Node: 22.8.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.9.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Chromium (127.0.2651.74)
  npmPackages:
    @emotion/react: ^11.13.3 => 11.13.3
    @emotion/styled: ^11.13.0 => 11.13.0
    @mui/material: ^6.1.3 => 6.1.3
    @mui/x-data-grid: 7.20.0 => 7.20.0
    @types/react: ^18.3.10 => 18.3.11
    react: ^18.3.1 => 18.3.1
    react-dom: ^18.3.1 => 18.3.1
    typescript: ^5.5.3 => 5.6.3

Search keywords: grid,rowSelectionModel

@tillkrischer tillkrischer added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 14, 2024
@arminmeh arminmeh added the component: data grid This is the name of the generic UI component, not the React module! label Oct 15, 2024
@arminmeh arminmeh self-assigned this Oct 15, 2024
@arminmeh arminmeh added regression A bug, but worse and removed bug 🐛 Something doesn't work labels Oct 15, 2024
@arminmeh
Copy link
Contributor

Confirmed that this is a regression.

Thanks for reporting @tillkrischer
Fix PR should be there soon

@arminmeh arminmeh added feature: Selection Related to the data grid Selection feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 15, 2024
@arminmeh
Copy link
Contributor

PR is there
I like your sandbox example data, by the way 😆

Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@tillkrischer How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

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: Selection Related to the data grid Selection feature regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants