Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popperConfig.placement isn't honoured #295

Open
woro83c opened this issue May 28, 2019 · 5 comments
Open

popperConfig.placement isn't honoured #295

woro83c opened this issue May 28, 2019 · 5 comments

Comments

@woro83c
Copy link

woro83c commented May 28, 2019

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!

@taion
Copy link
Member

taion commented May 28, 2019

Why can't you use the placement prop?

@woro83c
Copy link
Author

woro83c commented May 29, 2019

Unless I'm mistaken(?), there doesn't seem to be an option to centre the menu.

@jquense
Copy link
Member

jquense commented May 29, 2019

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

@woro83c
Copy link
Author

woro83c commented Sep 5, 2019

any update on this?

@taion
Copy link
Member

taion commented Sep 5, 2019

We’d be happy to take a PR here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants