[changed]Set the position of menu as "absolute" instead of "fixed"#75
[changed]Set the position of menu as "absolute" instead of "fixed"#75chenzhihao wants to merge 1 commit intoreactjs:masterfrom chenzhihao:master
Conversation
so the positioning of menu is correct when it's in dialog/modal
|
Would love to see this soon! This is my #1 issue with this library right now -- looks very low quality for users if they happen to scroll. |
|
You can override all of the menu styles, either via |
|
But left and top are calculated dynamically and will override most cases,
|
|
You don't have to apply all the styles, you can choose which to apply in |
|
@CMTegner I would like to see this merged, or at least the other version here: The position fixed + calculating a top position + setting a max height ends up being pretty awkward in practice. We ended up having to do this on our project to deal with the usability issues. Hope this helps someone: someSelectorForTheMenuComponentGoesHere {
position: absolute !important;
max-height: auto !important;
top: auto !important;
} |
Set the position of menu as "absolute" so the menu can scroll and position correctly in dialog/modal.
This is also a very common way to style dropdown menu.