Skip to content

Commit

Permalink
Review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwh committed Apr 19, 2023
1 parent 4287b31 commit db2334c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions resources/js/components/GroupLocation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@ export default {
this.geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
types: 'country,region,place,postcode,locality,neighborhood',
placeholder: this.$lang.get('groups.groups_location_placeholder')
placeholder: this.$lang.get('groups.groups_location_placeholder'),
proximity: 'ip'
});
// Tick to pick up id value.
this.$nextTick(() => {
this.geocoder.addTo('#' + this.inputid);
// setInput always opens the suggestions even though the second parameter is supposed to stop it doing so.
// So set the internal value.
this.geocoder._inputEl.value = this.currentValue
})
this.geocoder.on('result', (e) => {
Expand Down
8 changes: 6 additions & 2 deletions resources/js/components/VenueAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,17 @@ export default {
this.geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
types: 'country,region,place,postcode,locality,neighborhood',
placeholder: this.$lang.get('events.field_venue_placeholder')
placeholder: this.$lang.get('events.field_venue_placeholder'),
proximity: 'ip'
});
// Tick to pick up id value.
this.$nextTick(() => {
this.geocoder.addTo('#' + this.inputid);
// setInput always opens the suggestions even though the second parameter is supposed to stop it doing so.
// So set the internal value.
this.geocoder._inputEl.value = this.currentValue
})
this.geocoder.on('result', (e) => {
Expand Down

0 comments on commit db2334c

Please sign in to comment.