From 8b3c2443e66061cf32f0292aedf78ed1cd0a43e3 Mon Sep 17 00:00:00 2001 From: Ivan Monastyrev Date: Wed, 24 Jun 2020 10:10:16 +0300 Subject: [PATCH 1/2] suggestions: fix on-change --- src/components/VueDadata.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/VueDadata.vue b/src/components/VueDadata.vue index 1cd6dd5..b1e8ccb 100644 --- a/src/components/VueDadata.vue +++ b/src/components/VueDadata.vue @@ -168,16 +168,13 @@ export default class VueDadata extends Vue { } else if (event.which === ENTER) { event.preventDefault(); if (this.suggestionIndex >= 0) { - this.selectSuggestion(this.suggestionIndex); + await this.selectSuggestion(this.suggestionIndex); } } } public async onSuggestionClick(index: number) { - if (this.suggestions.length >= index - 1) { - this.inputQuery = this.suggestions[index].value; - this.suggestions = await this.fetchSuggestions(); - } + await this.selectSuggestion(index); } private async fetchSuggestions(): Promise { From 2edc5f770190346ad5b8e079202e6835d90c40f8 Mon Sep 17 00:00:00 2001 From: Ivan Monastyrev Date: Wed, 24 Jun 2020 10:12:11 +0300 Subject: [PATCH 2/2] app: update v1.4.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 624d58e..773b470 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-dadata", - "version": "1.4.6", + "version": "1.4.7", "description": "Vue component for hinting addresses using dadata.ru", "main": "dist/vuedadatacomponent.umd.js", "module": "dist/vuedadatacomponent.esm.js",