Skip to content
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

Migrate from Popper v2 to Floating UI #895

Open
cheton opened this issue Jul 18, 2024 · 1 comment
Open

Migrate from Popper v2 to Floating UI #895

cheton opened this issue Jul 18, 2024 · 1 comment

Comments

@cheton
Copy link
Member

cheton commented Jul 18, 2024

Learn how to migrate from Popper v2 to Floating UI:
https://floating-ui.com/docs/migration

Popper v2
https://popper.js.org/docs/v2/

Floating UI
https://floating-ui.com/

@cheton
Copy link
Member Author

cheton commented Jul 18, 2024

This enhancement will make the tooltip positioning dynamic based on overflow state:

+  const more = {
+    disabled: !isOverflow,
+  };
+  if (isOverflow) {
+    more.nextToCursor = true;
+  }
+
   return (
     <Tooltip
       ref={ref}
       arrow={false}
       disabled={!isOverflow}
-      nextToCursor={true}
+      {...more}
       {...rest}
     >

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant