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

There is no way to affect the stying of the menu in a SelectField #5288

Closed
gausie opened this issue Sep 29, 2016 · 8 comments
Closed

There is no way to affect the stying of the menu in a SelectField #5288

gausie opened this issue Sep 29, 2016 · 8 comments
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@gausie
Copy link

gausie commented Sep 29, 2016

Description

There is no way (via class or inline styling) to affect the styling of the popover menu in a SelectField.

menuStyle, despite looking like it might be the correct prop actually affects the underlying DropDownMenu control and not the dropdown menu itself.

Not sure how you would want this implemented so awaiting advice before making a PR.

Images & references

#4858

@Sharlaan
Copy link

Sharlaan commented Nov 5, 2016

Just stumbled upon same issue, trying to style the menu width....

In my humble opinion for a PR, i would play with this line in SelectField.js, renaming
style= with menuStyle= ?

@lucasbento lucasbento added good first issue Great for first contributions. Enable to learn the contribution process. component: select This is the name of the generic UI component, not the React module! bug 🐛 Something doesn't work labels Nov 6, 2016
@lucasbento
Copy link

@Sharlaan: That's exactly it!

Please send a PR with that change, we would be glad to review it.

cc @oliviertassinari.

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 6, 2016

For reference, we have #5091, #5389, #3388 and #5166 related to the overriding of the style properties. It would be good to find a coherent solution to all of those.

@danep93
Copy link

danep93 commented Jan 16, 2017

Is anyone still working on this? If not I'd like to give it a try

@mbrookes
Copy link
Member

This was fixed by #5389. 👍

@Bagnall
Copy link

Bagnall commented Jul 6, 2017

Hi, I'm new to this so could easily be wrong, but I think the intent of @gausie (correct me if I'm wrong @gausie) was to be able to control the style of the whole popover, not just the elements within it. menuStyle affects the select item itself (not the popover), selectedMenuStyle and menuItemStyle affect the entries in the popover but I think that @gausie 's request was to be able to affect the style of their ancestor (which I can only identify to you by means of its inline styles position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; z-index: 2000;) We too have the problem that we want to override that fixed z-index of 2000 in certain circumstances to make it higher still. If that div were to have an id or a class or if we could set inline styles for it, I think that would satisfy @gausie 's request and mine too. Is it possible to reopen this on that basis please @mbrookes ? Thanks in advance.

@mbrookes
Copy link
Member

mbrookes commented Jul 6, 2017

@Bagnall I believe you can override the z-index in the theme: http://www.material-ui.com/#/customization/themes

@Bagnall
Copy link

Bagnall commented Jul 6, 2017

Hi @mbrookes thanks, that appears to do the trick. I'm now setting z-index for layer based on this: https://github.com/callemall/material-ui/blob/master/src/styles/zIndex.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

No branches or pull requests

7 participants