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] We are encountering an issue with filtering in Data Grid Premium #15844

Open
JimmySVENSSON opened this issue Dec 11, 2024 · 1 comment
Labels
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 status: waiting for author Issue with insufficient information support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@JimmySVENSSON
Copy link

JimmySVENSSON commented Dec 11, 2024

The problem in depth

We are encountering an issue with filtering in Data Grid Premium.

Context:
Our setup includes a mix of hardcoded and dynamically generated columns.
We use the following code to allow filtering only with the ‘contains’ operator:
const filterOperators = getGridStringOperators().filter(
(operator) => operator.value === 'contains'
);

Problem:

  • When filtering on dynamically generated columns, the Data Grid does not display any rows, despite receiving the correct data from the backend.
  • If I remove the filter, I briefly see the correct rows before the grid resets to its initial state.
  • This issue does not occur with hardcoded columns; filtering works as expected there.

Observations:

  • If I change the operator to 'doesNotContain', the filtering works perfectly even for dynamically generated columns.
  • The backend request is identical for both operators (contains and doesNotContain).
  • This behavior seems to point to a possible timing or synchronization issue.

Questions:

  • Is there a known bug with filtering dynamically created columns?
  • Could this issue be related to the timing of dynamically creating columns during an API call?
  • As a workaround, using doesNotContain works for now. Is this a safe and supported approach?

Your environment

`npx @mui/envinfo` ``` this gives me 1000 rows of code and then error messege code: 2147749902, stdout: '', stderr: 'ERROR:\r\r\nDescription = Invalid namespace\r\r\n', failed: true, signal: null, cmd: 'wmic os get Caption', timedOut: false

but im using:
"@mui/x-data-grid-premium": "^7.23.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^6.2.0",
"@mui/material": "^6.2.0",
"@mui/styles": "^6.1.1",
"@mui/system": "^6.2.0",

Windows 10 and windows 11
Node.js v18.19.0

we have tested in Chorme 131.0.6778.86 and in OperaGX

</details>


**Search keywords**: Data Grid premium, filtering, server-side
**Order ID**: 101282
@JimmySVENSSON JimmySVENSSON added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Dec 11, 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 11, 2024
@michelengelen
Copy link
Member

To help us diagnose the issue efficiently, could you provide a stripped-down reproduction test case using the latest version? A live example would be fantastic! ✨

For your convenience, our documentation offers templates and guides on creating targeted examples: Support - Bug reproduction

Just a friendly reminder: clean, functional code with minimal dependencies is most helpful. Complex code can make it tougher to pinpoint the exact issue. Sometimes, simply going through the process of creating a minimal reproduction can even clarify the problem itself!

Thanks for your understanding! 🙇🏼

@michelengelen michelengelen changed the title [question] We are encountering an issue with filtering in Data Grid Premium [data grid] We are encountering an issue with filtering in Data Grid Premium Dec 11, 2024
@michelengelen michelengelen added status: waiting for author Issue with insufficient information 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 Dec 11, 2024
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: Filtering Related to the data grid Filtering feature status: waiting for author Issue with insufficient information support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

2 participants