-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make Input id as required (in TS typings) #51
Labels
documentation
Improvements or additions to documentation
Comments
Hmm, technically speaking, you don't actually ever need to add an id to an Input. Just like a native HTML input element will not trigger any warnings for lack of the id prop. Probably the documentation should be worded better. It should perhaps read: Inputs should have a unique ID prop whenever the label prop is being used. The behaviour of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The
id
for anInput
should probably be marked as required by it's TS typings. If not, its label will not havelabelFor
set.Expected behavior
Spit out a TS error when
id
is not present.Actual behavior
Not having an
id
is not flagged as an error, while the docs state thatid
should be set.Steps to reproduce the problem
Input
and don't set theid
propSpecifications
The text was updated successfully, but these errors were encountered: