Skip to content
This repository was archived by the owner on Sep 24, 2024. It is now read-only.

Commit 5a56351

Browse files
authored
Add options to restrict autocomplete to several countries (olefirenko#26)
1 parent 8985d55 commit 5a56351

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ Default: `address`
9292
Types supported in place autocomplete requests. [More info](https://developers.google.com/places/supported_types#table3)
9393

9494
#### country
95-
Type: `String`
95+
Type: `String`|`Array`
9696
Default: null
9797

98-
Option to restrict the autocomplete search to a particular country. Countries must be passed as a two-character, ISO 3166-1 Alpha-2 compatible country code (i.e. "br", "sg", "fr").
98+
Option to restrict the autocomplete search to a particular country. Countries must be passed as a two-character, ISO 3166-1 Alpha-2 compatible country code (i.e. "br", "sg", "fr"). You can provide a single one, or an array of up to 5 country code strings.
9999

100100
#### enable-geolocation
101101
Type: `Boolean`

src/VueGoogleAutocomplete.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
3838
country: {
39-
type: String,
39+
type: [String, Array],
4040
default: null
4141
},
4242
@@ -70,7 +70,7 @@
7070
if (this.types) {
7171
options.types = [this.types];
7272
}
73-
73+
7474
if (this.country) {
7575
options.componentRestrictions = {
7676
country: this.country

0 commit comments

Comments
 (0)