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

Quick filter breaking on grouped rows & some rows with random ids in 6.9.1 #9586

Closed
2 tasks done
mAllenBond opened this issue Jul 5, 2023 · 1 comment · Fixed by #9564
Closed
2 tasks done

Quick filter breaking on grouped rows & some rows with random ids in 6.9.1 #9586

mAllenBond opened this issue Jul 5, 2023 · 1 comment · Fixed by #9564
Assignees
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Filtering Related to the data grid Filtering feature

Comments

@mAllenBond
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/competent-wiles-yvykm5?file=/demo.tsx

Steps:

  1. Use the quick filter box to search any value
  2. Observe error:
Screenshot 2023-07-05 at 11 22 39 AM

Up to version 6.9.0, this behavior wasn't occurring. The only indication I can see of what might have caused it is possibly the optimizations to filtering #9254, but I'm not sure.

Current behavior 😯

Current behavior appears to be that when applying a quick (text) filter onto the table, rows that have derived ids (specified by a getRowId function) seem to cause issues, resulting in a 'no row found' error. The two cases where I noticed it happening were:

  • when searching on rows where the id was a UUID generated by a getRowId function,
  • when searching on rows in a table with some grouping applied, and a composite ID in getRowId (e.g [row.userId, row.cid].join('/')

Expected behavior 🤔

I would expect that quick filtering should still (and always) work with any rows that have valid ids generated either by default (from the row.id field) or by the getRowId function.

Context 🔦

This popped up as a bug ticket after we updated from 6.9.0 to 6.9.1.

Your environment 🌎

npx @mui/envinfo
  System:
    OS: macOS 13.3.1
  Binaries:
    Node: 18.16.0 - ~/.asdf/installs/nodejs/18.16.0/bin/node
    Yarn: 3.5.1 - ~/.asdf/installs/yarn/1.22.19/bin/yarn
    npm: 9.5.1 - ~/.asdf/installs/nodejs/18.16.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.198
    Edge: Not Found
    Firefox: 114.0
    Safari: 16.4
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1 
    @emotion/styled: ^11.11.0 => 11.11.0 
    @mui/base:  5.0.0-beta.4 
    @mui/core-downloads-tracker:  5.13.4 
    @mui/icons-material: ^5.11.16 => 5.11.16 
    @mui/lab: ^5.0.0-alpha.134 => 5.0.0-alpha.134 
    @mui/material: ^5.13.6 => 5.13.6 
    @mui/private-theming:  5.13.1 
    @mui/styled-engine:  5.13.2 
    @mui/system:  5.13.5 
    @mui/types:  7.2.4 
    @mui/utils:  5.13.6 
    @mui/x-data-grid:  6.9.1 
    @mui/x-data-grid-premium: ^6.9.1 => 6.9.1 
    @mui/x-data-grid-pro:  6.9.1 
    @mui/x-date-pickers: ^6.9.1 => 6.9.1 
    @mui/x-license-pro: ^6.9.0 => 6.9.0 
    @types/react: ^18.2.7 => 18.2.7 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: ^5.1.6 => 5.1.6 

Bug occurred while using Chrome

Order ID or Support key 💳 (optional)

No response

@mAllenBond mAllenBond added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 5, 2023
@romgrk romgrk added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Filtering Related to the data grid Filtering feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 5, 2023
@romgrk romgrk self-assigned this Jul 5, 2023
@romgrk
Copy link
Contributor

romgrk commented Jul 5, 2023

We are passing autogenerated rows to the user provided getRowId, which fails.

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: Filtering Related to the data grid Filtering feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants