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
What you were expecting:
Setting validate=required() on ReferenceInput to make the label appear as required.
What happened instead:
I needed to set validate on AutocompleteInput instead.
Maybe it would be good to mention validate in the ReferenceInput documentation to avoid this confusion? Unless there's a code fix to ensure that validate gets passed through?
You're right, we should catch the validate prop in <ReferenceInput> and throw an error explaining that it should be set on the child instead. Would you mind opening a PR for that?
This isn't caught by TypeScript as ReferenceInputProps extends InputProps which includes validate. Not sure what the implications are, but should that prop be omitted?
What you were expecting:
Setting
validate=required()
on ReferenceInput to make the label appear as required.What happened instead:
I needed to set validate on AutocompleteInput instead.
Maybe it would be good to mention validate in the ReferenceInput documentation to avoid this confusion? Unless there's a code fix to ensure that validate gets passed through?
Code I used looks something like:
The text was updated successfully, but these errors were encountered: