Skip to content
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(ComboBox): handle custom value on input blur #17396

Merged

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Sep 9, 2024

Closes #16864

This pull request fixes the handling of custom values on input blur. The changes ensure that the ComboBox correctly handles custom values again and updates the selected item accordingly. Also includes a refactoring to remove else-returns in the input blur switch block.

Changelog

Changed

  • ComboBox input blur behavior

Testing / Reviewing

  • visit the ComboBox story
  • enable allowCustomValue
  • select a preexisting value
  • modify the selection to a custom value
  • confirm that the previous selection is not highlighted when the component is reopened
  • confirm that the new value remains in the component

@emyarod emyarod requested a review from a team as a code owner September 9, 2024 19:22
Copy link

netlify bot commented Sep 9, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 76668ca
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66e0303b8c34f40008669ce0
😎 Deploy Preview https://deploy-preview-17396--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 9, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 76668ca
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66e0303bf912100008910280
😎 Deploy Preview https://deploy-preview-17396--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@ariellalgilmore ariellalgilmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kennylam kennylam added this pull request to the merge queue Sep 10, 2024
Merged via the queue into carbon-design-system:main with commit 890d9b5 Sep 10, 2024
23 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.66.0 was just released that references this issue/PR.

@emyarod emyarod deleted the 16864-fix/combobox-allowcustomvalue branch September 19, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: ComboBox allowCustomValue does not allow custom values if a value has been previously selected
3 participants