[Popper] When placement is set to "right" or "left", placement doesn't update based on viewport position #22708
Closed
2 tasks done
Labels
component: Popper
The React component. See <Popup> for the latest version.
external dependency
Blocked by external dependency, we can’t do anything about it
ready to take
Help wanted. Guidance available. There is a high chance the change will be accepted
When
placement
is set to any value beginning withtop
orbottom
, the placement will update dynamically if there isn't sufficient vertical space on the screen to place the Popper in that position. This is not true for anyright
orleft
placements. Ideally,right-start
could dynamically update toright-end
, etc.Current Behavior 😯
If placement value begins with
right
orleft
, vertical placement does not update based on screen position.Expected Behavior 🤔
Placement updates dynamically to attempt to keep the popper visible to the user. For instance, when placement is set to
right-start
, but the anchor is at the bottom of the screen, placement will update toright-end
.Steps to Reproduce 🕹
codesandbox
Steps:
Context 🔦
We use this popper (with
placement="right-start"
) to allow users to select from a list of actions. The popper can be up to 340px tall, and in many cases most of it is rendering offscreen. Dynamic vertical placement would help considerably.The text was updated successfully, but these errors were encountered: