Description
When I encountered #8373 I moved my callback ref to the wrapping Tooltip . This appeared to forward the ref to the underlying element as I wanted. However, if the passed ref is a callback ref, the tooltip never appears. This is not the case for an object ref.
Steps to reproduce
This breaks, even though it typechecks just fine. The log does get called, but the tooltip does not appear:
const logRef = useCallback(element => console.log(element), [])
return <Tooltip ref={logRef} text="Example"><Button>Button text</Button></Tooltip>
This works, but isn't a callback ref:
const logRef = useRef(null)
return <Tooltip ref={logRef} text="Example"><Button>Button text</Button></Tooltip>
And this shows the tooltip but never calls the log (#8373):
const logRef = useCallback(element => console.log(element), [])
return <Tooltip text="Example"><Button ref={logRef}>Button text</Button></Tooltip>
Version
v38.37.0
Browser
No response
Description
When I encountered #8373 I moved my callback ref to the wrapping
Tooltip. This appeared to forward the ref to the underlying element as I wanted. However, if the passed ref is a callback ref, the tooltip never appears. This is not the case for an object ref.Steps to reproduce
This breaks, even though it typechecks just fine. The log does get called, but the tooltip does not appear:
This works, but isn't a callback ref:
And this shows the tooltip but never calls the log (#8373):
Version
v38.37.0
Browser
No response