patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
796 stars 356 forks source link

Popper positioning enhancements #11155

Open tlabaj opened 2 weeks ago

tlabaj commented 2 weeks ago

Describe the enhancement or change A clear and concise description of the request. What is the expected outcome?

A consumer request form slack thread RHOAI ... as for the positioning of the arrow, it would be nice if PF could support the feature that comes from popper. But it’s not just the positioning of the arrow, it’s positioning of the content box itself to stay visible in the viewport if there’s enough space instead of pushing out of the viewport boundary and causing scroll bars to appear on the body.

ibolton336 commented 1 week ago

@tlabaj I am not able to see the popperProps position take effect. The Direction seems to work, but position isn't functional for me.

   <Dropdown
      className="violation-actions-dropdown"
      id="violation-actions-dropdown-id"
      isOpen={isOpen}
      onSelect={() => setIsOpen(false)}
      popperProps={{
        appendTo: document.body,
        position: "left",
        direction: "up",
        enableFlip: false,
      }}