Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

[changed]Set the position of menu as "absolute" instead of "fixed"#75

Open
chenzhihao wants to merge 1 commit intoreactjs:masterfrom
chenzhihao:master
Open

[changed]Set the position of menu as "absolute" instead of "fixed"#75
chenzhihao wants to merge 1 commit intoreactjs:masterfrom
chenzhihao:master

Conversation

@chenzhihao
Copy link
Copy Markdown

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.

so the positioning of menu is correct when it's in dialog/modal
@chenzhihao chenzhihao changed the title Set the position of menu as "absolute" Set the position of menu as "absolute" instead of "fixed" Feb 22, 2016
@chenzhihao chenzhihao changed the title Set the position of menu as "absolute" instead of "fixed" [changed]Set the position of menu as "absolute" instead of "fixed" Feb 22, 2016
@ztratar
Copy link
Copy Markdown

ztratar commented Aug 3, 2016

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.

@CMTegner
Copy link
Copy Markdown
Collaborator

CMTegner commented Aug 4, 2016

You can override all of the menu styles, either via props.menuStyle or by applying styles directly in the props.renderMenu function.

@ztratar
Copy link
Copy Markdown

ztratar commented Aug 4, 2016

But left and top are calculated dynamically and will override most cases,
no?
On Thu, Aug 4, 2016 at 4:16 AM Christian Maughan Tegnér <
notifications@github.com> wrote:

You can override all of the menu styles, either via props.menuStyle or by
applying styles directly in the props.renderMenu function.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#75 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA6TLghPxmXDy98R-bmN7tUtEKRng5Mxks5qccnwgaJpZM4HfRj2
.

@CMTegner
Copy link
Copy Markdown
Collaborator

CMTegner commented Aug 4, 2016

You don't have to apply all the styles, you can choose which to apply in props.renderMenu. You don't have to use props.menuStyle at all (or the style parameter passed to renderMenu).

@a-r-d
Copy link
Copy Markdown

a-r-d commented Jan 5, 2017

@CMTegner I would like to see this merged, or at least the other version here:
#135 Let me know if there is anything I can do to help.

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;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants