Allow possibility to use different reference on useFloating
See original GitHub issueOn usePopper we have an option to pass referenceElement and popperElement but in useFloating we don’t have that option.
The useFloating is responsible to return the refs but in some cases is not possible to set the returned ref to an element, because that referenceElement is passed as a prop (anchor is outside of my component), but looking to the docs I saw that useFloating use computePosition that receive this two references as an argument.
My solution is to use computePosition instead of useFloating but I will lose all functionalities provided by useFloating
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
React - Floating UI
If you want anchor positioning to be relative to a different reference element than the one that receives events, this is possible. You...
Read more >One reference, multiple floating components? · Issue #1821
We want a button with these behaviors: on hover, displays its title in a tooltip; on click, opens an action menu.
Read more >floating-ui react-dom-interactions how to set floating element ...
I want to set the floating element width same as reference element. I have tried to follow this approach from documentation but didn't...
Read more >How to use Floating ui with react | by Kyosuke Ito | Dev Genius
This toolkit is to create floating elements but not an animation library with floating elements. In other words, you can add your animation...
Read more >PackageReference in project files - NuGet - Microsoft Learn
With PackageReference, you can also use MSBuild conditions to choose package references per target framework, or other groupings.
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

So you’d do this:
Just need to make sure when
anchorRef.currentgets updated that the position can also be updatedPerfect, thanks @atomiks