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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Neues
Copy link

@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 13b31ba
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66f55be7e588f70008f9e8c7
😎 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 13b31ba
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66f55be706d3bf0007edff09
😎 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 76.96%. Comparing base (72c80b3) to head (bd98a91).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17527   +/-   ##
=======================================
  Coverage   76.95%   76.96%           
=======================================
  Files         408      408           
  Lines       13979    13981    +2     
  Branches     4343     4339    -4     
=======================================
+ Hits        10758    10760    +2     
  Misses       3047     3047           
  Partials      174      174           

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

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
1 participant