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] Helper text should be in error color if both disabled and error are set to true #13210

Closed
2 tasks done
jiayuandeng opened this issue Oct 11, 2018 · 2 comments
Closed
2 tasks done
Labels
component: button This is the name of the generic UI component, not the React module! new feature New feature or request
Milestone

Comments

@jiayuandeng
Copy link
Contributor

jiayuandeng commented Oct 11, 2018

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

If a TextField has disabled="true" and error="true", the helper text should be in error color.

According to Material Design Spec:

Error message
When text input isn’t accepted, an error message can display instructions on how to fix it. Error messages are displayed below the input line, replacing helper text until fixed.

Since error message "replaces" the helper text, it should always be in error color whether the TextField is disabled or not.

Current Behavior

If a TextField has disabled="true" and error="true", the helper text is in disabled color (gray).

Steps to Reproduce

Link:

  1. https://codesandbox.io/s/ryw2w9m93n

Context

Your Environment

Tech Version
Material-UI latest
React latest
@jiayuandeng jiayuandeng changed the title [TextField] Helper text should be in error color if the TextField has both disabled and error set to true [TextField] Helper text should be in error color if both disabled and error set to true Oct 11, 2018
@jiayuandeng jiayuandeng changed the title [TextField] Helper text should be in error color if both disabled and error set to true [TextField] Helper text should be in error color if both disabled and error are set to true Oct 11, 2018
@matthewdordal
Copy link
Contributor

I can open a PR to fix this issue.

@oliviertassinari oliviertassinari added new feature New feature or request component: button This is the name of the generic UI component, not the React module! labels Oct 13, 2018
@oliviertassinari oliviertassinari modified the milestones: v4, v3.3.0 Oct 13, 2018
@samuelpucat
Copy link

What about border color of TextField variant="outlined" when both error="true" and disabled="true" ? Both variant="standard" and variant="filled" have border bottom red, while outlined have the same border as when only disabled. I can't seem to find it in Material Design spec. Maybe disabled and error state don't even go together.

Here is a comparison: https://codesandbox.io/s/material-demo-forked-ygq3um?file=/demo.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants