-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TableBody] Why componentWillReceiveProps set only the last item selected when I deselect an item? #3980
Comments
@akosk how are you using |
@nathanmarks I use React 0.14.8, I corrected the version number. Sorry for my mistake. |
Repeating @akosk's question, is there a reason for |
+1 |
@akosk: @nathanmarks is working on the 0.16.0 release, which will address many issues with the table component. Have a look at issue #2251. I think we can close this issue for now as it's being addressed in the new release |
The issue:
I found the following code in table-body.js / componentWillReceiveProps:
What is the purpose of [this.state.selectedRows[this.state.selectedRows.length - 1]]?
Why should deselect all items but the last one when select all was checked before?
If I remove the true branch it works as expected: the clicked item and the select all checkbox in header becomes unchecked.
Versions
Material-UI: 0.15.0-alpha2 & 0.14.4
React: 0.14.8
Browser: Chrome (49.0.2623.112 m)
The text was updated successfully, but these errors were encountered: