-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
autoUpdate: Allow not passing a floating element #3399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for vibrant-gates-22c214 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@floating-ui/core
@floating-ui/dom
@floating-ui/react
@floating-ui/react-dom
@floating-ui/react-native
@floating-ui/utils
@floating-ui/vue
commit: |
|
Are you using this outside a Floating UI/anchoring kind of context? |
|
Hi atomiks, I'm basically using only the positional tracking, because my use case is rendering a bunch of lines in an SVG overlay that connects DOM elements. Do you think it could be useful to expose that functionality? My thinking was, it's already there, the tracking works great, with a few tweaks to the interface it would allow for cases where it's necessary to do custom rendering (or maybe just tracking positions alone for whatever reason). I was looking for libraries to solve this issue and this was the closest/best I found. I do realize though that it might be a bit outside the core purpose of the library, and my PR might not be the cleanest solution. I'll admit that it's mostly for my own convenience that I submitted this PR, since it would save me the hassle of having a fork :) |
This PR updates
autoUpdateto allow forfloatingto benulldom/src/autoUpdate.ts:
Motivation:
This enables use cases where you only want to track changes to the reference element without necessarily having a floating element.
Impact:
No breaking changes.
Expands the function’s flexibility for broader scenarios.