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

required attribute is not supported in Autocomplete component in TypeScript #210

Open
jingcheng16 opened this issue Mar 11, 2023 · 0 comments

Comments

@jingcheng16
Copy link

Issue:
TypeScript complains about passing required into Autocomplete

Description:
The "required" attribute is not a standard HTML attribute that is supported by all input types, and therefore, it is not included in the React.HTMLAttributes interface.
Would it be possible to update the ReactGoogleAutocompleteInputProps interface to include all HTML attributes that are supported by input types, regardless of whether they are considered standard or not? This would allow users to pass in any input attribute, including the "required" attribute, without encountering TypeScript errors.

My workaround:
ts-ignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant