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

[TextField] Multiline does not carry 'color' style property. #3059

Closed
RobertLippens opened this issue Jan 26, 2016 · 5 comments
Closed

[TextField] Multiline does not carry 'color' style property. #3059

RobertLippens opened this issue Jan 26, 2016 · 5 comments
Labels
bug 🐛 Something doesn't work component: TextareaAutosize The React component.

Comments

@RobertLippens
Copy link

I ran into an issue where

<TextField
          fullWidth={true}
          inputStyle={styles.inputStyle}
          hintStyle={styles.hintStyle}
          hintText={this.props.hintText}
          value={this.state.value}
          onChange={this.changeText}
/>

with an inputStyle of :

var styles = {
  inputStyle: {
    color: "white",
  },
}

This colors the text in the text-field white as expected, but when I apply multiLine={true} the text turns to a default black, which, as you might imagine against a black background, is quite difficult to see.

@mbrookes mbrookes changed the title Multiline text-field does not carry 'color' style property. [TextField] Multiline does not carry 'color' style property. Jan 27, 2016
@mbrookes mbrookes added the bug 🐛 Something doesn't work label Jan 27, 2016
third pushed a commit to third/material-ui that referenced this issue Jan 30, 2016
…i#3059

inputStyle is propagated to single-line TextField but not when on multi-line mode (textarea).
@zachguo
Copy link
Contributor

zachguo commented Feb 9, 2016

Has this fix 51e9f10 been merged? I'm still having this issue in 0.14.4.

@c0b41
Copy link

c0b41 commented Feb 10, 2016

@zachguo not publish see #3142

@cgestes
Copy link
Contributor

cgestes commented Feb 10, 2016

Not sure what should be done with inputStyle when we use a textarea, but textareaStyle is now available.

For reference we have:

      inputElement = multiLine ? (
        <EnhancedTextarea
          style={inputStyleMerged}
          textareaStyle={textareaStyleMerged}
          ...
        />
      ) : (
        <input
          style={this.prepareStyles(inputStyleMerged)}
          ...
        />
      );

when using a textarea inputStyle goes to the div including the textarea and textareaStyle to the actual textarea.

@oliviertassinari
Copy link
Member

When using a textarea inputStyle goes to the div including the textarea and textareaStyle to the actual textarea.

That sounds good. I think that we can close this issue.

@newoga
Copy link
Contributor

newoga commented Mar 8, 2016

Related to #3099, we're going to make the change in this comment which should fix this. I'll include considering this when we refactor TextField.

@newoga newoga self-assigned this Mar 8, 2016
@oliviertassinari oliviertassinari added the component: TextareaAutosize The React component. label Apr 5, 2020
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: TextareaAutosize The React component.
Projects
None yet
Development

No branches or pull requests

7 participants