olefirenko / vue-google-autocomplete

A Vue.js autosuggest component for the Google Places API.
https://olefirenko.github.io/vue-google-autocomplete/
MIT License
505 stars 258 forks source link

@no-results-found is called when user selects result #155

Closed Bowis closed 3 years ago

Bowis commented 3 years ago

I have:

` <vue-google-autocomplete v-if="showAddressInput" id="map" classname="form-control" placeholder="Start typing" :fields="['address_components']" @placechanged="getAddressData" @no-results-found="noResultsFound" country="nl" types="(regions)"

`

But when the user types the address and selects one of the option that the API returns, the @no-results-found is called, and. the @placechangd is never called, how can this happen?

clydeso commented 3 years ago

I have the same issue when I specify fields.

My temporary solution was to check the input/object from noResultsFound to see if a place_id exist (one of the fields I require), then call getAddressData manually from the method (with the result object).

clydeso commented 3 years ago

Actually, never mind. Someone else mentioned the required fields:

['address_components', 'geometry']