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
feat(FormGroup, FormSelect, TextInput, TextArea): Add warning state #4554
Conversation
PF4 preview: https://patternfly-react-pr-4554.surge.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Core is going to need another bump before we promote (see patternfly/patternfly#3294) and the release notes will need to be updated as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tlabaj just one thing I don't understand. On the FormSelect component, when I change the ValidatedOptions
value in this line from error
to warning
the text below the field does not display correctly.
this.setState({ validated: ValidatedOptions.warning, invalidText: 'You must chose Three (thought that was obvious)' });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line in the Validated example on Form Select is missing a "2" to get it to display the warning state when selecting the second option.
else if (value === '') { this.setState({ validated: ValidatedOptions.warning, helperText: 'You must select a value' });
Should be
else if (value === '2') { this.setState({ validated: ValidatedOptions.warning, helperText: 'You must select a value' });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please disregard my earlier comment. I misunderstood how the example is intended to work. This is approved!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM
What: Closes #4547