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 believe the code is expecting the children to only be a string and in that case this works properly. A fix for this would be to allow a custom title to be passed down as a prop for these scenarios where the title can not be inferred from the child.
Package
@carbon/react
Browser
Chrome, Safari, Firefox, Edge
Package version
v1.62.1
React version
^17.0.0
Description
According to the docs, https://react.carbondesignsystem.com/?path=/docs/components-tag--overview, the Tag component can have a children prop of type
node
. When given any type other than string as a child, the Tag component acts incorrectly. It adds all of the children to the Title attributeThis was added in this PR 96524a7#diff-bf61738276a5e024a5901f050aa6781f38a21104524c5fcfdf84c9bd8248e8ef
I believe the code is expecting the children to only be a string and in that case this works properly. A fix for this would be to allow a custom title to be passed down as a prop for these scenarios where the title can not be inferred from the child.
Reproduction/example
https://stackblitz.com/edit/github-ynms4h-zd7ufe?file=src%2FApp.jsx
Steps to reproduce
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: