-
Notifications
You must be signed in to change notification settings - Fork 15
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
Display errors in SUSE Manager settings form #2455
Conversation
onClearErrors(); | ||
}} | ||
/> | ||
<div className="col-span-4"> |
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.
What about embedding the error in the input component?
<Input
value={url}
placeholder="Enter a URL"
error={getError('url', errors)}
onChange={({ target: { value } }) => {
setUrl(value);
onClearErrors();
}}
/>
Really up to you 😄 There are just many hasError
and related getError
.
I am fine either way
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 is something I'd be up to but it would tie us to one single implementation of error visualization and I want to wait instead for more form implementations to see what we settle upon.
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.
b1abc6e
to
e816e64
Compare
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
Description
Displaying validation errors in the SUSE Manager settings modal.
How was this tested?
Jest tests, Storybook