diff --git a/src/components/Hoverable/index.js b/src/components/Hoverable/index.js index eff165870048..f39c44b278ae 100644 --- a/src/components/Hoverable/index.js +++ b/src/components/Hoverable/index.js @@ -119,6 +119,7 @@ function InnerHoverable({disabled, onHoverIn, onHoverOut, children, shouldHandle } }, [disabled, isHovered, onHoverIn, onHoverOut]); + // Expose inner ref to parent through outerRef. This enable us to use ref both in parent and child. useImperativeHandle(outerRef, () => ref.current, []); const child = useMemo(() => React.Children.only(mapChildren(children, isHovered)), [children, isHovered]);