-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(17041): use react-fast-compare to compare props update in DataTable #17056
fix(17041): use react-fast-compare to compare props update in DataTable #17056
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@tay1orjones since you were there in the conversation of this issue, What do you think this optimise the performance? If yes, should we try this with other components as well, i.e, using isEqual for element comparing in components like multiselect, filterable multiselect. Because there are issues we can generally see with firefox in many components. |
@riddhybansal Yeah this looks great, I think we can use it anywhere we use lodash's isEqual. |
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.
Hey thanks for contributing !! This is awesome 🚀
930d97b
Closes #17041
This is use react-fast-compare to compare the updated properties in DataTable's shouldComponentUpdate method, use lodash.isEqual will hurt performance issue from: facebook/react#19811
Changelog
New
Changed
Removed
Testing / Reviewing
this is just a 3rd party package replacement, we just need to make sure the DataTable can be rendered properly.