Skip to content

Commit

Permalink
Merge pull request #77 from ikloster03/issue-73
Browse files Browse the repository at this point in the history
Fix inChange bug
  • Loading branch information
ikloster03 authored Jun 24, 2020
2 parents 9bec638 + 2edc5f7 commit ef5ad18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 2 additions & 5 deletions src/components/VueDadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<DadataSuggestion[]> {
Expand Down

0 comments on commit ef5ad18

Please sign in to comment.