You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: There have been prior similar issues (#973) and discussions (#2134) about this bug. However, this issue explains and requests the specific solution of directly exposing the fallbackAxisSideDirection prop to fix it.
Current Behavior
When a Popover side is set and there are collisions on both the preferred side and the opposite side on the same axis, the Popover is rendered with collisions. There is no current ability to allow switching to the opposite axis if there are collisions on both sides of the preferred axis.
Expected behavior
Allow fallback to the opposite axis if no placements along the preferred placement axis fit. This is already implemented in floating-ui using the fallbackAxisSideDirection prop.
We are running into issues that exposing this configuration could solve, especially on mobile.
Currently our only option is to add media query or resize observers and pass different configuration for small screens.
Given that the floating-ui library already supports this, I don't see what is the problem with exposing this option.
Bug report
Note: There have been prior similar issues (#973) and discussions (#2134) about this bug. However, this issue explains and requests the specific solution of directly exposing the
fallbackAxisSideDirection
prop to fix it.Current Behavior
When a Popover
side
is set and there are collisions on both the preferred side and the opposite side on the same axis, the Popover is rendered with collisions. There is no current ability to allow switching to the opposite axis if there are collisions on both sides of the preferred axis.Expected behavior
Allow fallback to the opposite axis if no placements along the preferred placement axis fit. This is already implemented in
floating-ui
using thefallbackAxisSideDirection
prop.Reproducible example
https://codesandbox.io/p/sandbox/runtime-cloud-3wxgyr?workspaceId=a15b72ac-5a79-4491-92e9-225b36bd712d
Suggested solution
Expose a
fallbackAxisSideDirection
prop, and pass it with thedetectOverflowOptions
in thefloating-ui
flip
middleware.Your environment
The text was updated successfully, but these errors were encountered: