-
-
Notifications
You must be signed in to change notification settings - Fork 351
[combobox] Avoid clearing selected value if item is not present in items array #3824
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
base: master
Are you sure you want to change the base?
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Greptile SummaryThis PR removes the automatic value reconciliation logic that was clearing selected values when the
The change aligns with native Confidence Score: 5/5
Important Files Changed
|
sarthakmalik0810
left a comment
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.
Thank you for the quick fix @atomiks! Since this might have broken async Comboboxes, do you think the release for this fix could be expedited? Many thanks!
This avoids surprises with
valuegetting cleared (tonull) when the selected item isn't present initems, particularly in async combobox implementations. Native<select>s retain the previousvaluein state when the<option>gets removed from the list, with the exception that it automatically selects a fallback value which is a bit confusing hereFixes #3818
Fixes #3502