react-overlays
react-overlays copied to clipboard
popperConfig.placement isn't honoured
Supplying the placement option to the popperConfig object doesn't seem to have any effect. It looks like it gets overridden by the placement prop, here:
https://github.com/react-bootstrap/react-overlays/blob/master/src/DropdownMenu.js#L144
I was hoping to centre the menu, i.e.:
<DropdownMenuBase flip popperConfig={{ placement: 'bottom' }} />
Cheers!
Why can't you use the placement prop?
Unless I'm mistaken(?), there doesn't seem to be an option to centre the menu.
There isn't yeah, We should maybe add one. In general tho the reason it's not respected is that Dropdown is supposed to be more opinionated about placement than a tooltip or plain popper usage, since it's a specific implementation. Centering tho is something we should allow
any update on this?
We’d be happy to take a PR here.