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 event should also work on blur event #152

Open abhimanusharma opened 3 years ago

abhimanusharma commented 3 years ago

In some cases I have internal input fields where user might not press enter just blur from the text field or try to submit the form, in that case I want to store the value of that field.

I tried to use blur event and also tried to set v-model for the <vue-google-autocomplete component, but none of this works for me.

<vue-google-autocomplete
    ref="address"
    id="map"
   v-model="address"
    classname="md-input"
    placeholder="Please type your address"
    @placechanged="getAddressData"
    @no-results-found="setStreetAddress"
    @blur="setStreetAddress"
    country="us">
</vue-google-autocomplete>