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: refactor and fix controlled combobox #17527

Merged
merged 6 commits into from
Oct 7, 2024

Conversation

Neues
Copy link
Contributor

@Neues Neues commented Sep 19, 2024

Closes #16565

Refactor and bug fixes for controlled combobox

Changelog

Changed

  • Refactor code related to controlled combobox for simplicity.
  • Update ComboBox when selectedItem prop changes externally.
  • Call onChange when combobox is cleared or updated.
  • Unit tests for these cases.
  • Storybook example for fully controlled component.

* Refactor code related to controlled combobox for simplicity.
* Update ComboBox when selectedItem prop changes externally.
* Call onChange when combobox is cleared or updated.
* Unit tests for these cases.
* Storybook example for fully controlled component.
Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 9a13e01
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6703d336c95c1a0008c0f150
😎 Deploy Preview https://deploy-preview-17527--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 19, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9a13e01
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6703d336fc8f7e00081c9184
😎 Deploy Preview https://deploy-preview-17527--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.

@Neues Neues marked this pull request as ready for review September 19, 2024 11:37
@Neues Neues requested a review from a team as a code owner September 19, 2024 11:37
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.03%. Comparing base (ea46616) to head (13b31ba).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17527   +/-   ##
=======================================
  Coverage   77.03%   77.03%           
=======================================
  Files         408      408           
  Lines       13993    13995    +2     
  Branches     4321     4321           
=======================================
+ Hits        10779    10781    +2     
  Misses       3041     3041           
  Partials      173      173           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@preetibansalui preetibansalui left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks Noah.

Copy link
Member

@annawen1 annawen1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@annawen1 annawen1 added this pull request to the merge queue Oct 7, 2024
Merged via the queue into carbon-design-system:main with commit f232cb6 Oct 7, 2024
35 of 36 checks passed
@carbon-automation
Copy link
Contributor

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

@Neues Neues deleted the controlled-combobox branch October 10, 2024 14:50
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]: Fully controlled ComboBox (with selectedItem and onChange provided) does not properly update value
4 participants