Skip to content

Commit 64855a5

Browse files
committed
fix(ItemBase): size observer * 6
1 parent e093f8f commit 64855a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/content/ItemBase/ItemBase.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ const ItemBase = <T extends HTMLElement = HTMLDivElement>(
515515
if (isAutoTooltipEnabled) {
516516
checkLabelOverflow();
517517
}
518-
}, [children, isAutoTooltipEnabled]);
518+
}, [children, isAutoTooltipEnabled, checkLabelOverflow]);
519519

520520
useEffect(() => {
521521
if (!isAutoTooltipEnabled) return;
@@ -527,7 +527,7 @@ const ItemBase = <T extends HTMLElement = HTMLDivElement>(
527527
resizeObserver.observe(label);
528528

529529
return () => resizeObserver.disconnect();
530-
}, [mergedLabelRef.current, isAutoTooltipEnabled]);
530+
}, [mergedLabelRef.current, isAutoTooltipEnabled, checkLabelOverflow]);
531531

532532
const finalLabelProps = useMemo(() => {
533533
return {

0 commit comments

Comments
 (0)