Is there a way to allow a popover to cover its trigger rather than scroll? #9247
Replies: 2 comments
|
Can't see the image unfortunately, but I'll answer based on the question. There's no direct prop to make the popover cover its trigger before scrolling. React Aria's
Things you could try:
The "cover trigger before scrolling" behavior isn't built into the positioning algorithm — it prioritizes keeping the popover adjacent to (not overlapping) the trigger. You'd likely need to either accept the scroll behavior, implement custom positioning outside |
|
You should be able to use If you want it to cover entirely and not scroll, it may be a better alternative to consider using a Dialog in those cases. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We have this date picker component that launches a popover with a calendar when clicked. If there's not enough room for the calendar, I'd prefer that the popover cover the trigger before being forced to scroll; only having the scrollbar if the screen is literally not tall enough.
Is what I'm asking possible with
usePopover?All reactions