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
The Dropdown's itemToElement prop doesn't seem to be called anymore. Interestingly enough, itemToString can be used as a substitute for this (though based on the console outputs I don't think this is the intended use).
I couldn't find anything in the documentation or issues regarding a deprecation so I assume this is a regression?
@guidari Interesting, I didn't know that. So if I only have strings and need to display them as elements I need to wrap them in dummy objects, like { id: 'my-value' }?
Could you elaborate on the reasoning for this constraint?
Package
@carbon/react
Browser
Safari
Package version
1.49.0
React version
No response
Description
The Dropdown's
itemToElement
prop doesn't seem to be called anymore. Interestingly enough,itemToString
can be used as a substitute for this (though based on the console outputs I don't think this is the intended use).I couldn't find anything in the documentation or issues regarding a deprecation so I assume this is a regression?
Reproduction/example
https://stackblitz.com/edit/github-jxltcv?file=src%2FApp.jsx
Steps to reproduce
itemToElement
:(item) => <em>{item.toLowerCase()}</em>
itemToElement
:itemToString
(results in expected result):Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: