Skip to content

[Popper] Add option to always re-position popper (rAF-based) #2092

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

Merged
merged 4 commits into from
Jun 5, 2023

Conversation

rynobax
Copy link
Contributor

@rynobax rynobax commented Apr 19, 2023

Description

Allow passing autoUpdateOptions to floating-ui, which allows using requestAnimationFrame to keep tooltip attached to element that is being moved programmatically. Not sure if this is the ideal API for enabling this behavior (maybe a boolean prop like enableRequestAnimationFrameUpdate or something would be simpler), feel free to change.

Originally asked about this here: #2006

Closes #1612
Closes #2006

@benoitgrelard benoitgrelard added the PR: Under Consideration Has potentially wider implications which are being discussed label Apr 24, 2023
@benoitgrelard benoitgrelard added PR: Documentation Needed This PR warrants a documentation update and removed PR: Under Consideration Has potentially wider implications which are being discussed labels Jun 5, 2023
@benoitgrelard benoitgrelard changed the title [Popper] Allow customization of floating-ui autoUpdateOptions [Popper] Add option to always re-position popper (rAF) Jun 5, 2023
@benoitgrelard benoitgrelard changed the title [Popper] Add option to always re-position popper (rAF) [Popper] Add option to always re-position popper (rAF-based) Jun 5, 2023
@benoitgrelard
Copy link
Contributor

Thanks for your contribution @rynobax.

Not sure if this is the ideal API for enabling this behavior (maybe a boolean prop like enableRequestAnimationFrameUpdate or something would be simpler), feel free to change.

Yes I agree, I don't see many reason why anybody would disable some of the more optimised built-in positioning update, so really it's about opting-into a less optimised strategy for specific cases.

I have reworked the API accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Documentation Needed This PR warrants a documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Popper][Tooltip] TooltipContent doesn't follow trigger
3 participants