actengage / vue-place-autocomplete

A Vue component for the Google Place Autocomplete API.
Other
26 stars 27 forks source link

v-place-autofill.* isn't working #1

Closed techdaddies-kevin closed 5 years ago

techdaddies-kevin commented 5 years ago

I have 3 models in Vue called city, state, country. I have the following for the place-autocomplete-field snippet:

<place-autocomplete-field
                                                    v-model="field1"
                                                    placeholder="Enter an an address, zipcode, or location"
                                                    label="Address"
                                                    name="field1"
                                                    api-key="XXX"
                                                    v-place-autofill.city="city"
                                                    v-place-autofill.state="state"
                                                    v-place-autofill.country="country"
                                            >
                                            </place-autocomplete-field>

However, when I select an item from the autofill, my city, state, and country models are not being filled out. In fact, they are being set to null. IE, if I pre-set their values to "Preset Value", upon selecting an item from the autofill dropdown, all 3 values are set to null. So this component can communicate with my models, but for some reason it's not actually setting the values for them properly.

I'm not sure what info would be helpful to troubleshoot this.

techdaddies-kevin commented 5 years ago

I discovered that the syntax in the README is incorrect. Updated the README in PR #2