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
We currently have a few large popovers in our app for picking a date range. When our PopoverButton is near the center of the screen, the Panel renders in a scrollable container because it is too tall to fit in the space between the bottom of the button and the bottom of the screen. The panel today will "flip" and render above the button, but the space above the button might also be too small and the Panel will still render in a scrollable container.
I don't believe it is possible with headlessui's anchor prop to "shift" the Panel so that it renders on top of the Button, and then would only render as a scrollable container if the popover panel is taller than the full vertical screen real estate. It seems like floating UI's shift({ crossAxis: true }) would do the trick.
We are upgrading to headlessui v2 & attempting to use the native floating behavior. Transitioning away from the @headlessui-float/react package. That package supported this natively
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We currently have a few large popovers in our app for picking a date range. When our PopoverButton is near the center of the screen, the Panel renders in a scrollable container because it is too tall to fit in the space between the bottom of the button and the bottom of the screen. The panel today will "flip" and render above the button, but the space above the button might also be too small and the Panel will still render in a scrollable container.
I don't believe it is possible with headlessui's
anchor
prop to "shift" the Panel so that it renders on top of the Button, and then would only render as a scrollable container if the popover panel is taller than the full vertical screen real estate. It seems like floating UI'sshift({ crossAxis: true })
would do the trick.We are upgrading to headlessui v2 & attempting to use the native floating behavior. Transitioning away from the
@headlessui-float/react
package. That package supported this nativelyBeta Was this translation helpful? Give feedback.
All reactions