Skip to content

Commit e27b558

Browse files
authored
Merge pull request #71 from edisile/master
Added google.maps.places.Autocomplete class options as prop to autocomplete component
2 parents 499a5b1 + 644b385 commit e27b558

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/components/Autocomplete.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export default {
6464
updateMap: {
6565
type: Boolean,
6666
default: true
67+
},
68+
options: {
69+
type: Object,
70+
default: () => ({})
6771
}
6872
},
6973
computed: {
@@ -110,7 +114,10 @@ export default {
110114
this.$_map = mapComp ? await mapComp.$_getMap() : null
111115
},
112116
googleMapsReady () {
113-
this.$_autocomplete = new window.google.maps.places.Autocomplete(this.$refs.input)
117+
this.$_autocomplete = new window.google.maps.places.Autocomplete(
118+
this.$refs.input,
119+
this.$props.options
120+
)
114121
this.$_autocomplete.setTypes(this.$props.types)
115122
116123
if (this.$_map) {

0 commit comments

Comments
 (0)