-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(Dropdown): isEqual over shallowEqual for props #2252
fix(Dropdown): isEqual over shallowEqual for props #2252
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2252 +/- ##
=========================================
Coverage ? 99.73%
=========================================
Files ? 152
Lines ? 2652
Branches ? 0
=========================================
Hits ? 2645
Misses ? 7
Partials ? 0
Continue to review full report at Codecov.
|
Let's get a test here that fails with the workflow reported in the issue. This way we don't hit the regression again.
|
Added UT for when props are updated with options that are the same and when props are updated with new options. |
Awesome, thank you very much @chrisjbrown! |
Released in |
fixes #2243
Component on
componentWillReceiveProps
will always runsetSelectedIndex
because shallowEqual on two objects internally runsobject.is(a, b)
to compare objects which will always be false becausenextProps.options
andthis.props.options
are not the same object