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

Fieldset incorrectly gets set in error when a child input is in error #245

Open
edwardhorsford opened this issue Jul 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@edwardhorsford
Copy link
Contributor

It seems like the fieldset component will set itself in error if one of the child inputs inside it is in error. This is not correct - it should only be in error if the fieldset as a whole is in error.

The result is that the left red error bar extends across the entire fieldset, rather than just the field that is in error.

You could possibly say that this is something to be decided on a question by question basis - but then this shouldn't be the default as it's not how the native components work.

It's not in the docs, but reading the package source, I see you can use <Fieldset disableErrorLine="false"> to explicitly disable this.

Incorrect:
Screenshot 2024-07-15 at 13 46 35

Correct:
Screenshot 2024-07-15 at 13 58 07

There's no example of this in the NHS design system, but it's covered in the GOV.UK design system:
Screenshot 2024-07-15 at 13 58 58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant