[Bug]: `<Popover>` component does not use forwardRef
See original GitHub issueWhat package within Headless UI are you using?
What version of that package are you using?
1.3.0
What browser are you using?
Chrome
Reproduction repository
N/A
Describe your issue
(Censored to protect confidentiality)
It looks like Popover.Button
and friends use forwardRef, but not Popover
itself.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Popover is not appearing if anchor component does ... - GitHub
A possible workaround is to wrap anchor element with a container in Popover itself. I don't whether doing this will break any styles...
Read more >react-aria and Typescript building a popover component error ...
I have been using react-aria to build a popover in Storybook. This popover is built in two components, the first one is the...
Read more >Forwarding Refs - React
Ref forwarding is an opt-in feature that lets some components take a ref they receive, and pass it further down (in other words,...
Read more >react-tiny-popover - npm
A simple and highly customizable popover react higher order component with no other dependencies! Typescript friendly.
Read more >React Tooltip component - Material UI - MUI
The Tooltip has 12 placement choices. They don't have directional arrows; instead, they rely on motion emanating from the source to convey direction....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oops, I was wrong while responding to this issue. Most of the time we have the Root element render a Fragment just so that we can setup context providers and I assumed the same here.
It’s true that all components have an
as
prop. I’m going to think about whether there is a downside of usingforwardRef
everywhere 🤔This should be fixed by #1116, and will be available in the next release.
You can already try it using:
npm install @headlessui/react@insiders
oryarn add @headlessui/react@insiders
.