diff --git a/README.md b/README.md index 1dcb142..43deb43 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ The example below shows the correct usage of the `types` parameter, when limitin classname="form-control" placeholder="Start typing" v-on:placechanged="getToData" - types="(cities)" + :types="['geocode', 'establishment']" country="us" > diff --git a/src/VueGoogleAutocomplete.vue b/src/VueGoogleAutocomplete.vue index 62af2c7..a88c801 100644 --- a/src/VueGoogleAutocomplete.vue +++ b/src/VueGoogleAutocomplete.vue @@ -32,14 +32,14 @@ 'administrative_area_level_1', 'administrative_area_level_2']; /* - By default, we're only including basic place data because requesting these + By default, we're only including basic place data because requesting these fields place data is not additionally charged by Google. Please refer to: https://developers.google.com/maps/billing/understanding-cost-of-use#basic-data */ - const BASIC_DATA_FIELDS = ['address_components', 'adr_address', 'alt_id', - 'formatted_address', 'geometry', 'icon', 'id', 'name', - 'permanently_closed', 'photo', 'place_id', 'scope', 'type', 'url', + const BASIC_DATA_FIELDS = ['address_components', 'adr_address', 'alt_id', + 'formatted_address', 'geometry', 'icon', 'id', 'name', + 'permanently_closed', 'photo', 'place_id', 'scope', 'type', 'url', 'utc_offset', 'vicinity']; export default { @@ -64,8 +64,8 @@ }, types: { - type: String, - default: 'address' + type: Array, + default: null }, fields: { @@ -147,7 +147,7 @@ const options = {}; if (this.types) { - options.types = [this.types]; + options.types = this.types; } if (this.country) {