You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 Input is to automatically inject a pre-formatted label should the label prop be applied.
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: