ErrorPro / react-google-autocomplete

React components for google places API.
MIT License
476 stars 113 forks source link

Unable to set type against autocomplete #108

Closed jdwholmes closed 3 years ago

jdwholmes commented 3 years ago

I'm using the autocomplete in my project alongside tailwindcss.

Tailwindcss by default applies styles to any input with [type]=*

The AutoComplete doesn't actually use type="text" by default, so these styles aren't applied.

I've tried adding type="text" to the autocomplete, which does work. But I get the following error:

Type '{ apiKey: string; className: string; onPlaceSelected: (place: any) => void; options: { types: string[]; componentRestrictions: { country: string; }; }; type: string; }' is not assignable to type 'IntrinsicAttributes & ReactGoogleAutocompleteInputProps'. Property 'type' does not exist on type 'IntrinsicAttributes & ReactGoogleAutocompleteInputProps'

ErrorPro commented 3 years ago

@jdwholmes Are you sure you're using the latest version of the lib? works for me on the latest version image