-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
I just spent half a day trying to figure out why my ref wasn't working, because I had it on the inner element instead of on <Popover>, haha XD
e.g., I had this:
<Popover
...
>
<button ref={(newRef) => console.log(newRef)}>
test
</button>
</Popover>But needed this:
<Popover
ref={(newRef) => console.log(newRef)}
...
>
<button>
test
</button>
</Popover>I think it'd be nice if ref were supported in either place. It looks like this would be as easy as just modifying this line of code in Popover.tsx so that it merges any existing ref attributes:
const renderChild = () => cloneElement(children, { ref: handleRef });I'd be happy to try to provide a PR, if you like; just let me know :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels