-
Notifications
You must be signed in to change notification settings - Fork 82
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
values
props are not working with multi
option
#13
Comments
Hey @jayasurian123 please checkout slightly modified fork of your sandbox (note the line 58-59 for correction) |
hi @sanusart I know that would work 😇. The example was just a simplification of showing external state management like redux state would not work with the current implementation. Thats why cloned the I have come across this because of this scenario. It would be always better to compare the array instead of their reference. Or removing |
@jayasurian123 got it. |
@jayasurian123 Seems like scenario you posted works with 3.1.0. Thanks for taking time to report and investigate! |
@sanusart Thanks a ton. It's a fantastic lib. Keep up the great work 👍 |
I was trying to set the
values
prop externally to theSelect
dropdown. It would work perfectly when the reference of thevalues
props are same. But if we are usingredux
or any other external state management it will not work.I created a small reproducible scenario here.
https://codesandbox.io/s/external-clear-68i29
I have also had a look at the code and the issue which i suspect is
react-dropdown-select/src/index.js
Line 107 in 4441b36
We may need to have a proper array comparison here.
eg:
Let me know if you need any more info from my side!
thanks for the nice lib.
The text was updated successfully, but these errors were encountered: