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] bug using firefox #15936

Closed
kanzaki337 opened this issue Dec 19, 2024 · 7 comments
Closed

[data grid] bug using firefox #15936

kanzaki337 opened this issue Dec 19, 2024 · 7 comments
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@kanzaki337
Copy link

kanzaki337 commented Dec 19, 2024

Steps to reproduce

1. Create a DataGridPro with the following setup:

const configDataGrid: GridColDef[] = [
  { field: 'first_ip', headerName: 'First Ip', flex: 1 },
];

const App = () => (
  <DataGrid
    rows={[]} // Empty array
    columns={configDataGrid}
  />
);

2. Run the application in Firefox.
3. Observe the error in the console.

Current behavior

When using DataGrid with a column configuration that includes flex: 1 and an empty rows array (rows={[]}), Firefox throws the following error:

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

Expected behavior

The DataGridPro should gracefully handle empty rows with flex-based column widths without throwing errors, regardless of the browser.

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: mui, x-data-grid

Order ID: aass

@kanzaki337 kanzaki337 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 the component: data grid This is the name of the generic UI component, not the React module! label Dec 19, 2024
@michelengelen
Copy link
Member

Which version of the data grid are you using?
there was a bug we fixed and released in 7.23.2 ... for reference: #15721

@michelengelen michelengelen added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 19, 2024
@michelengelen michelengelen changed the title DataGrid bug using firefox [data grid] bug using firefox Dec 19, 2024
@kanzaki337
Copy link
Author

Which version of the data grid are you using? there was a bug we fixed and released in 7.23.2 ... for reference: #15721

I am using 7.23.0 data grid,,
Ok fine, I'll try to upgrade to the latest version, thank you in advance..

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Dec 19, 2024
@kanzaki337
Copy link
Author

Which version of the data grid are you using? there was a bug we fixed and released in 7.23.2 ... for reference: #15721

I'm using dataGrid version 7.23.3 now, but still encountering the same issue..

Unexpected Application Error!
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

checkForNestedUpdates@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:19687:19
scheduleUpdateOnFiber@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:18561:11
dispatchSetState@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:12423:36
onEmpty@http://localhost:3000/node_modules/.vite/deps/chunk-ZAKOYB4L.js?v=2b275a5c:2131:18
InputBase2/checkDirty<@http://localhost:3000/node_modules/.vite/deps/chunk-THLMMSF5.js?v=2b275a5c:590:7
InputBase2/<@http://localhost:3000/node_modules/.vite/deps/chunk-THLMMSF5.js?v=2b275a5c:595:17
commitHookEffectListMount@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:16936:34
commitLayoutEffectOnFiber@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:17024:48
commitLayoutMountEffects_complete@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:18008:42
commitLayoutEffects_begin@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:17997:48
commitLayoutEffects@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:17948:36
commitRootImpl@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:19381:32
commitRoot@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:19305:27
performSyncWorkOnRoot@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:18923:21
flushSyncCallbacks@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:9135:30
node_modules/react-dom/cjs/react-dom.development.js/ensureRootIsScheduled/<@http://localhost:3000/node_modules/.vite/deps/chunk-WW4AH6NN.js?v=2b275a5c:18655:21

@cherniavskii
Copy link
Member

I can't reproduce it in Firefox or Chrome with this demo: https://codesandbox.io/p/sandbox/mystifying-archimedes-75vlqw
@kanzaki337 Can you?

@cherniavskii cherniavskii added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 19, 2024
@kanzaki337
Copy link
Author

kanzaki337 commented Dec 19, 2024

I can't reproduce it in Firefox or Chrome with this demo: https://codesandbox.io/p/sandbox/mystifying-archimedes-75vlqw @kanzaki337 Can you?

Now the problem is clear, I think after I upgraded to version 7.23.3 there was still a cache that caused the problem not to be clear..
thanks a lot for your help..
@michelengelen @cherniavskii etc

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Dec 19, 2024
@michelengelen
Copy link
Member

All right ... I'll close the issue since the problem seems to be resolved! Thanks @cherniavskii !

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

@kanzaki337 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.

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 20, 2024
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!
Projects
None yet
Development

No branches or pull requests

3 participants