-
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 onCreateOption is not always called for Creatable #3990
Conversation
🦋 Changeset detectedLatest commit: 64ad645 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 64ad645:
|
Any update on plans to release this fix? |
Yes, I could use this fix, This is causing a new label XXX to appear as "Create XXX" |
This issue (comparing with reference) sometimes causes Merging and releasing this PR would fix it. Edit: I tested this solution with our misbehaving component, and it indeed fixed it. |
Could this fix get merged and published please? Thanks in advance! |
Would be greatly appreciated if this fix could be released! 🙏 |
Looking forward for this fix. Thanks for your great work! |
@JedWatson this looks good to me - pending your review. |
@bladey @JedWatson Hi guys! Do you think we can merge this? :) |
EDIT: 🎉 I've archived the fork now that we've got some momentum in this repo and Jed is involved again. Sorry for the disturbance! |
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.
@nikitaindik Thanks for the PR!
- Can you add a test?
- My preference would actually be to change the behavior in
Select.js
to only memoize the options when they are strictly equal by changingisEqual(newProps.options, lastProps.options)
tonewProps.options === lastProps.options
here (might as well change the other ones fromisEqual
to===
as well). This allows people to use strict equality in their ownonChange
methods and not have to worry about the implementation detail that the memoization depends on an internalisEqual
method. This memoization was introduced in Fix not focusing the selected value on menu open #3868 and I don't believe the memoization was essential to the fix in that PR.
Hi @Methuselah96! I'll have some spare time during the weekend. I'll try to add a test see if I can resolve this isEqual thing. |
@nikitaindik Let me know if you don't have time to make the changes. I can do it myself if you don't have the time. |
Yep, sure. I'm still a little busy. Sorry. Please feel free to improve this
PR.
…On Tue, Dec 22, 2020 at 2:18 AM Nathan Bierema ***@***.***> wrote:
@nikitaindik <https://github.com/nikitaindik> Let me know if you don't
have time to make the changes. I can do it myself if you don't have the
time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3990 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZV2WR2JGSRFSVSP4UOYYLSV7XXDANCNFSM4LVREXJQ>
.
|
Issue: #3988
The issue is caused by "newOption" being recreated as a new object on every render.