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

[InputBase] Remove dead disableUnderline property #13720

Merged
merged 2 commits into from
Nov 28, 2018
Merged

[InputBase] Remove dead disableUnderline property #13720

merged 2 commits into from
Nov 28, 2018

Conversation

PierreCapo
Copy link

@eps1lon
Copy link
Member

eps1lon commented Nov 28, 2018

It looks like this class key is not used in InputBase. Could you add a link to the documentation where this class key is documented or a codesnippet how you use this class key?

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This style rule doesn't exist. Something is wrong.

@PierreCapo
Copy link
Author

PierreCapo commented Nov 28, 2018

Hello guys, sorry for not letting a note on my PR, I had to go fast. The issue I'm facing is that when i do :

const styles = {
  root: {
    color: "white",
  },
  icon: {
    fill: "white"
  }
};

<Select
    inputProps={{
    classes: {
         root: classes.root
          icon: classes.icon
     }
    }}>
</Select>

I got a typescript error upon icon which basically says that the key is not specified in the this class.

image

With the PR I made it fixes the problem, but after reading your comments I understand that I haven't provided the good solution. Instead, it seems that there is a SelectClassKey in the Select.d.ts file which should be used for typing this part of the code, but instead it just uses the regular InputBaseClassKey. I'm going to look why and update the PR when I find the solution.

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 28, 2018

@PierreCapo Let me guide you through it. The class name you want to target is:

capture d ecran 2018-11-28 a 21 17 38

The component is Select and the style rule is icon so, it should be:

const styles = {
  icon: {
    fill: "white"
  }
};

<Select classes={{ icon: classes.icon }} />

I'm updating the pull request to remove the dead disableUnderline typescript property.

@oliviertassinari oliviertassinari changed the title Add icon to InputBaseClassKey types [InputBase] Remove dead disableUnderline property Nov 28, 2018
@oliviertassinari oliviertassinari self-assigned this Nov 28, 2018
@oliviertassinari oliviertassinari merged commit 2ce70f0 into mui:master Nov 28, 2018
@PierreCapo
Copy link
Author

Thanks @oliviertassinari for your comment, I understand better how the styling works now 👍

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

Successfully merging this pull request may close these issues.

3 participants