Skip to content

Commit 6440534

Browse files
authored
fix(BaseListItem): fix overflow tooltip (#3151)
1 parent b91490f commit 6440534

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/core/src/components/BaseListItem/BaseListItem.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,19 @@ const BaseListItem = forwardRef(
4848
const Element = component as React.ElementType;
4949

5050
return (
51-
<Tooltip {...tooltipProps} content={tooltipProps?.content} position={dir === "rtl" ? "right" : "left"}>
51+
<Tooltip
52+
{...tooltipProps}
53+
content={tooltipProps?.content}
54+
position={dir === "rtl" ? "right" : "left"}
55+
containerSelector="body"
56+
>
5257
<Element id={id} ref={ref} className={listItemClassNames} role={role} {...itemProps} aria-selected={selected}>
5358
{itemRenderer ? (
5459
itemRenderer(item)
5560
) : (
5661
<>
5762
{startElement && renderSideElement(startElement, disabled, textVariant)}
58-
<Text type={textVariant} color="inherit">
63+
<Text type={textVariant} color="inherit" tooltipProps={{ containerSelector: "body" }}>
5964
{label}
6065
</Text>
6166
{endElement && (

0 commit comments

Comments
 (0)