Skip to content

Commit

Permalink
Merge branch 'hotfix/1.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Dec 23, 2020
2 parents 81ca761 + ce9667a commit 1554e64
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
13 changes: 12 additions & 1 deletion dist/components/StoreLocator/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components/StoreLocator/index.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/components/StoreLocator.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ Emitted when the MapboxMap component is loaded.
**Params**
- `map` (`Map`): the Mapbox map instance

### `geocoder-created`

Emitted when the Geocoder component is ready.

**Params**
- `geocoder` (`Geocoder`): the Geocoder instance

### `select-item`

Emitted when an item is selected from the map or from the list.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/vue-mapbox-gl",
"version": "1.4.1",
"version": "1.4.2",
"description": "A small components library to use Mapbox GL in Vue.",
"homepage": "https://github.com/studiometa/vue-mapbox-gl#readme",
"bugs": {
Expand Down
13 changes: 12 additions & 1 deletion src/components/StoreLocator/StoreLocator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
<mapbox-geocoder
:class="classes.search || {}"
v-bind="{ ...mapboxGeocoder, accessToken }"
@mb-result="onGeocoderResult" />
@mb-result="onGeocoderResult"
@mb-created="onGeocoderCreated" />

<!-- @slot Use this slot to display information after the search. -->
<slot
Expand Down Expand Up @@ -352,6 +353,16 @@
}
},
/**
* Propagate the `mb-created` event from the MapboxGeocoder component.
*
* @param {Geocoder} geocoder The geocoder instance.
* @return {void}
*/
onGeocoderCreated(geocoder) {
this.$emit('geocoder-created', geocoder);
},
/**
* Handler for the map created event.
*
Expand Down

0 comments on commit 1554e64

Please sign in to comment.