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
I'm using the Radix UI Popover and would like to suggest a prop for the PopoverContent component to opt out of repositioning while the popover is open. I have two use cases where not repositioning the popover is desirable:
When the anchor changes its size during the exit animation of the popover. The popover abruptly changes position during the animation which I'd like to prevent.
Screenshot.2022-05-11.at.22.05.59.mp4
When the content of the popover changes due to user input and the changed popover size leads to a repositioning. In this case I'd rather keep it in its original position to avoid disorientation, especially as the content only gets smaller.
Screenshot.2022-05-11.at.22.07.33.mp4
I think this could be implemented somewhat easily, too. It would require adding a boolean flag to useRect and useSize and drilling that prop through the PopperContent and PopoverContent.
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
-
Hey Radix people! 👋
I'm using the Radix UI Popover and would like to suggest a prop for the
PopoverContent
component to opt out of repositioning while the popover is open. I have two use cases where not repositioning the popover is desirable:Screenshot.2022-05-11.at.22.05.59.mp4
Screenshot.2022-05-11.at.22.07.33.mp4
I think this could be implemented somewhat easily, too. It would require adding a boolean flag to
useRect
anduseSize
and drilling that prop through thePopperContent
andPopoverContent
.primitives/packages/react/use-rect/src/useRect.tsx
Line 10 in 1096771
primitives/packages/react/use-size/src/useSize.tsx
Line 5 in 1096771
What do you think about it? I could also write the code for this.
Beta Was this translation helpful? Give feedback.
All reactions