Skip to content

fix : allow-custom-value from overwriting combo box value on open#21861

Open
naaa760 wants to merge 2 commits intocarbon-design-system:mainfrom
naaa760:fix/cds-com-val-overwrit-disp-set
Open

fix : allow-custom-value from overwriting combo box value on open#21861
naaa760 wants to merge 2 commits intocarbon-design-system:mainfrom
naaa760:fix/cds-com-val-overwrit-disp-set

Conversation

@naaa760
Copy link
Contributor

@naaa760 naaa760 commented Mar 18, 2026

Closes #21860

  • Fixes cds-combo-box overwriting its value with the selected item display text on open when allow-custom-value is enabled.

Changelog

Changed

  • Preserve value on open when the input matches the selected item display text.

Testing / Reviewing

  • Added a unit test for the reported scenario.
    Verify: set allow-custom-value, set value to an item’s value, open, confirm value stays unchanged and the selected item remains selected.

PR Checklist

@naaa760 naaa760 requested a review from a team as a code owner March 18, 2026 18:35
@naaa760 naaa760 requested review from emyarod and maradwan26 March 18, 2026 18:35
@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 17f4734
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69baf085deef0c0008f5f4a0
😎 Deploy Preview https://deploy-preview-21861--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 project configuration.

@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 17f4734
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69baf08526cebf0008c254c5
😎 Deploy Preview https://deploy-preview-21861--v11-carbon-web-components.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 project configuration.

@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ca07c6d
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69baf0ddd81c7d0008fd33a8
😎 Deploy Preview https://deploy-preview-21861--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 project configuration.

@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit ca07c6d
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69baf0dd79f400000818d663
😎 Deploy Preview https://deploy-preview-21861--v11-carbon-web-components.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 project configuration.

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.39%. Comparing base (796bf1c) to head (ca07c6d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #21861   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files         536      536           
  Lines       43679    43679           
  Branches     6278     6274    -4     
=======================================
  Hits        41231    41231           
  Misses       2309     2309           
  Partials      139      139           
Flag Coverage Δ
main-packages 87.84% <ø> (ø)
web-components 97.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@adamalston adamalston left a comment

Choose a reason for hiding this comment

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

Hi, could you restore the pull request description from the template and complete it?

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]: cds-combo-box with allow-custom-value overwrites its own value with the matched item's display text on open when a default value is set

2 participants