Closed darkengine closed 3 years ago
@darkengine just published 2.0.3 where this should be fixed. Let me know if it's still reproduced
@darkengine just published 2.0.3 where this should be fixed. Let me know if it's still reproduced
Nice! It works now.
One more suggestion: Add denounce when typing may reduce network requests significantly.
@darkengine Hey, it's already done in v2.0.0. There's a hook called useAutocompleteService
which has debounce in it.
onPlaceSelected props not being called when clicking on search result item.
But you can find a "PlaceService.GetPlaceDetails" network request is done correctly in Chrome's devtool network section.
My code is:
<AutoComplete style={{ width: "90%" }} apiKey={GOOGLE_MAP_API_KEY} onPlaceSelected={place => console.log('place:', place)} options={{ types: ["address"], componentRestrictions: { country: "us" }, }} />