Skip to content

Commit 6a9112b

Browse files
committed
fix: Internal use of onDismissOnScroll
1 parent b3788a1 commit 6a9112b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/tooltip/internal.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default function InternalTooltip({
3131
}: InternalTooltipComponentProps) {
3232
const baseProps = getBaseProps(restProps);
3333
const trackRef = React.useRef<HTMLElement | SVGElement | null>(null);
34-
const [isVisible, setIsVisible] = React.useState(true);
3534

3635
// Update the ref with the current tracked element
3736
React.useEffect(() => {
@@ -67,14 +66,9 @@ export default function InternalTooltip({
6766
}, [onEscape]);
6867

6968
const handleDismissOnScroll = React.useCallback(() => {
70-
setIsVisible(false);
7169
fireNonCancelableEvent(__onDismissOnScroll);
7270
}, [__onDismissOnScroll]);
7371

74-
if (!isVisible) {
75-
return null;
76-
}
77-
7872
return (
7973
<Portal>
8074
<div

0 commit comments

Comments
 (0)