@enso-ui/typeahead 3.0.10 → 3.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/typeahead",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
4
4
  "description": "Vue Typeahead",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <typeahead v-bind="$attrs"
3
+ :http="http"
3
4
  :i18n="i18n"
4
5
  :source="source ? route(source) : null"
5
6
  :error-handler="errorHandler"
@@ -23,7 +24,7 @@ export default {
23
24
 
24
25
  components: { Typeahead },
25
26
 
26
- inject: ['errorHandler', 'i18n', 'route'],
27
+ inject: ['errorHandler', 'http', 'i18n', 'route'],
27
28
 
28
29
  props: {
29
30
  source: {
@@ -29,6 +29,10 @@ export default {
29
29
  type: Boolean,
30
30
  default: false,
31
31
  },
32
+ http: {
33
+ required: true,
34
+ type: Function,
35
+ },
32
36
  i18n: {
33
37
  type: Function,
34
38
  default: v => v,
@@ -163,10 +167,10 @@ export default {
163
167
  this.ongoingRequest.cancel();
164
168
  }
165
169
 
166
- this.ongoingRequest = axios.CancelToken.source();
170
+ this.ongoingRequest = this.http.CancelToken.source();
167
171
  this.loading = true;
168
172
 
169
- axios.get(this.source, {
173
+ this.http.get(this.source, {
170
174
  params: this.requestParams,
171
175
  cancelToken: this.ongoingRequest.token,
172
176
  }).then(({ data }) => {