-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
v0.11 - [Table] If selected
key for some rows gets changed ensure table internal selection array gets updated
#1325
Conversation
}; | ||
}, | ||
|
||
componentWillReceiveProps(nextProps) { | ||
if (this.props.allRowsSelected && !nextProps.allRowsSelected) { | ||
if (nextProps.rowData !== this.props.rowData) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could get tricky. The new table implementation does not use rowData; it relies on children. We'll need to check the children for changes instead of rowData which could get quite expensive if we are doing this check every time the component receives props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I went through that a bit quickly. Will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries; other changes look good. We might want to check the table for performance metrics; recreating a lot of components can get quite expensive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now fixed this issue. From my testing I can say I don't think performance will be an issue except for very large tables.
v0.11 - [Table] If `selected` key for some rows gets changed ensure table internal selection array gets updated
Thanks @hiddentao @jkruder |
Same as #1282 but for v0.11 branch.