Skip to content

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

Open
@jingcheng16

Description

@jingcheng16

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions