[Bug]: Select component ignores "selected" property on page load #18164
Labels
component: select
package: @carbon/web-components
@carbon/web-components
status: needs triage 🕵️♀️
type: bug 🐛
Package
@carbon/web-components
Browser
Chrome
Package version
v2.18.0
React version
No response
Description
When using the cds-select component and including "selected" on a cds-select-item element, the option is not selected on page load. Interestingly, if you modify the DOM in the developer toolbar to add "selected" AFTER the page initially loads, it properly selects the element.
Interestingly, the "disabled" property doesn't have the same problem on cds-select-item elements.
Reproduction/example
https://stackblitz.com/github/carbon-design-system/carbon/tree/main/packages/web-components/examples/components/select?file=index.html
Steps to reproduce
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Application/PAL
IBM Industry Compliance PIMS Portal
Code of Conduct
The text was updated successfully, but these errors were encountered: