-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGrid] "Cannot read property 'id' of undefined" when rows update #575
Comments
I can't reproduce the exception on the codesandbox. We could wait for the resolution of #571 to see if it solves your case but without a reproduction, we operate in the dark. You are depending on chance for the outcome. |
Been having the same issue. When updating the DataGrid from the backend with new or updated rows we get the |
@orhels Thank you so much ✨ ! I hope with this reproduction the problem can be looked into and fixed |
I submitted #571. Just FYI for everyone here, I bumped down a version to |
Had the same issue and downgraded to alpha8 and my filter now works. |
* Fix #575 reset sortedRows state on prop change * fix typescript issue * fix lint * prettier * update dep array * polish tests * Update packages/storybook/src/stories/grid-sorting.stories.tsx Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * Update packages/storybook/src/stories/grid-sorting.stories.tsx Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * avoids confusion, sort is not immutable * cleanup story * refactor applySorting * fix lint Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
While updating the sortedRows should fix the problem for this specific issue, I believe a related issue (which brought me here) exists for the selectedRows, which are not updated when rows change either. |
The fix can be tried with: "@material-ui/data-grid": "https://pkg.csb.dev/mui-org/material-ui-x/commit/02423225/@material-ui/data-grid",
"@material-ui/x-grid": "https://pkg.csb.dev/mui-org/material-ui-x/commit/02423225/@material-ui/x-grid", |
So far, we have got one valid reproduction from @orhels: https://codesandbox.io/s/sharp-hawking-20q80. which is solved: https://codesandbox.io/s/nice-frog-togvz?file=/package.json. @SvenFaerber You would need to provide a new reproduction in a new issue. |
@oliviertassinari testet it in my project and it worked flawlessly. Thanks to you and @dtassone for the hard work 👏🏼 |
I faced the same issue, got resolved by deprecating the version to 4.0.0-alpha.8. This thread helped a lot. Thanks everyone. |
I submitted a ticket to zendesk first and was asked to create an issue here. I was also told this is similar to issue #571
Current Behavior 😯
I'm working with XGrid and since the Filter feature is not yet available, I'm trying to implement it manually, but I keep getting this error (see screenshot and screen recording bellow) and can't figure out what I'm doing wrong. Essentially what I do is re render all the rows (like in the docs https://material-ui.com/components/data-grid/rows/#the-rows-prop).
Expected Behavior 🤔
Updating rows and/or columns should work as expected without error.
Steps to Reproduce 🕹
Tried to reproduce but it's kind of hard to reproduce all the condition since all of the data is brought from a backend, but this CodeSandbox link is more or less how I manage the data.
Steps:
Context 🔦
Basically implement Filtering feature manually.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: