Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
</vue-google-autocomplete>
Expand Down
14 changes: 7 additions & 7 deletions src/VueGoogleAutocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -64,8 +64,8 @@
},

types: {
type: String,
default: 'address'
type: Array,
default: null
},

fields: {
Expand Down Expand Up @@ -147,7 +147,7 @@
const options = {};

if (this.types) {
options.types = [this.types];
options.types = this.types;
}

if (this.country) {
Expand Down