You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to show the component label after selecting a component option for dropdown.
What package(s) are you using?
carbon-components-react
Detailed description
Describe in detail the issue you're having. Is this a feature request (new
component, new icon), a bug, or a general issue?
Is this issue related to a specific component? Yes, carbon/packages/react/src/components/Dropdown/Dropdown.js
What did you expect to happen? What happened instead? What would you like to
see changed?
For dropdown component, if I use itemsToElement to make option an component, after select it, it will show itemToString function's result. I think it should show the component as well.
After I checked the source code of Dropdown.js, I found below code. It use itemToString function to render the label. In my circumstance, I want to use itemToElement to render the label. Shall we support it for this dropdown component?
Title line template: [Title]: Brief description
I want to show the component label after selecting a component option for dropdown.
What package(s) are you using?
carbon-components-react
Detailed description
Describe in detail the issue you're having. Is this a feature request (new
component, new icon), a bug, or a general issue?
After I checked the source code of Dropdown.js, I found below code. It use itemToString function to render the label. In my circumstance, I want to use itemToElement to render the label. Shall we support it for this dropdown component?
{selectedItem ? itemToString(selectedItem) : label}
Source: carbon/packages/react/src/components/Dropdown/Dropdown.js
The text was updated successfully, but these errors were encountered: