-
Notifications
You must be signed in to change notification settings - Fork 933
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
Invalid attempt to spread non-iterable instance #1118
Comments
Hello @xStorm11, is your version of Material-UI given in this ticket the actual version you are using to produce the error? If so, note that this version is very out of date, and could be the source of your problem. See if upgrading to the latest fixes your issue (though you may need to change some other things to get it to work). If the problem persists after upgrading your Material-UI version, then I'll need to see a minimal codesandbox example that demonstrates the issue so I can find out what may be happening. |
@xStorm11 @gabrielliwerant I can verify this. I've fixed this in PR #1077 - it only occurs if you update babel and other packages though. It won't occur in the current setup. It's due to this line: "prevState.selectedRows" shouldn't be spread over. If you do a console.dir on it, you'll see why it can't be spread over (see #692 (comment) for more info). The version of babel this project uses just ignores the error, but it pops up if you update babel. This PR also describes the issue: #692 (but it gives a faulty solution) And actually, my response in that PR better explains exactly what is happening. |
First of all, thank you very much for answer me @gabrielliwerant and @patorjk . |
You're welcome @xStorm11. Keeping this open until the fix is merged in, so it can be tracked. |
Fixed as of version 3 of the table. |
Hello, i'm currently working on a project using mui-datatables and i needed to comment the following code because it crashes the project when i use the "Select/Unselect all":

I didn't change the code, i even tried to use mui-datatables on other projects and i had the same error.
Expected Behavior
Select/Unselect all like the codesandbox example allows.
Current Behavior
This is what happens when i click on the checkbox:

Your Environment
The text was updated successfully, but these errors were encountered: