diff --git a/libs/shared/lib/components/tooltip/Tooltip.tsx b/libs/shared/lib/components/tooltip/Tooltip.tsx index 33c54848ee1cc8efa4d9e1594da0330fb5defb89..95c792f6280edbc6e1e3b195c4f68cf31da5dbbc 100644 --- a/libs/shared/lib/components/tooltip/Tooltip.tsx +++ b/libs/shared/lib/components/tooltip/Tooltip.tsx @@ -129,9 +129,9 @@ export const TooltipTrigger = React.forwardRef<HTMLElement, React.HTMLProps<HTML const context = useTooltipContext(); const childrenRef = React.useMemo(() => { if (children == null) { - return null; + return React.createElement('div').ref; } else { - return (children as any).ref; + return (children as React.ReactElement).ref; } }, [children]);