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

[Select] [Styling Bug] Specifying root class key inside inputProps prop removes default styling #11867

Closed
2 tasks done
franklixuefei opened this issue Jun 15, 2018 · 1 comment
Assignees
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

@franklixuefei
Copy link
Contributor

franklixuefei commented Jun 15, 2018

  • This is a v1.x issue (v0.x is no longer maintained).
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

specifying root class key inside inputProps prop should not remove the default styling.

Current Behavior

Suppose I have a style like this:

const style = theme => ({
  input: {
    width: '100%'
  }
});

And then, I have a component that renders a Select component:

<Select
  value="and"
  inputProps={{
    classes:{ root: classes.input }
  }}
>
  <MenuItem value={"and"}>And</MenuItem>
  <MenuItem value={"or"}>Or</MenuItem>
</Select>

This results in the default styling being removed, as shown below:

Before adding style:

image

After adding style:

image

Your Environment

Tech Version
Material-UI v1.2.1
React 16.4.0
browser
etc
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work 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! labels Jun 15, 2018
@oliviertassinari
Copy link
Member

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

2 participants