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

Dropdown direction only takes effect if the prop is updated after the component renders #212

Open
jketcham opened this issue Jan 9, 2019 · 1 comment

Comments

@jketcham
Copy link

jketcham commented Jan 9, 2019

The dropdownDirection prop only sets the dropdown menu to be "flipped" (i.e. opening upwards) if the prop is updated after the initial mount.

This is because the css style that changes the direction of the dropdown only gets applied in the componentDidUpdate handler (where the bottom value is set directly on the element) of the DropdownMenu component, see here.

To fix this, the bottom: XXpx value should be set in the base css theme so it's not dependent on the component to manually set the style.

If there's something I'm missing please let me know, I've had to manually set the css so it opens upward correctly.

@ArthurBugan
Copy link

Hi!, can you share your solution? Thx

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

No branches or pull requests

2 participants