Description
Package
@carbon/react
Browser
No response
Package version
v11.78.0
React version
No response
Description
-
Label text does not get truncated in treeview/treeNode
-
The component does not have
tooltips
integrated within it (like -IconButton, ContentSwitcher with icons, CopyButton, Slider )
Reproduction/example
https://stackblitz.com/edit/github-ndgnpet1?file=src%2FApp.jsx&preset=node=
Steps to reproduce
Pass a really long label
to TreeNode
Note:
A workaround is to pass a Tooltip in a label - so that label is displayed inside of a tooltip but here too no truncation happens
<TreeNode
key="1"
id="1"
value="Artificial intelligence"
label={
<span>
this does not truncate : Artificial intelligence Artificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligenceArtificial
intelligenceArtificial intelligence
</span>
}
/>

Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate problems
Metadata
Metadata
Assignees
Type
Projects
Status
🚦 In Review