From 0428891773fa80e46ace0e99f44d6d052edcc741 Mon Sep 17 00:00:00 2001 From: Preston Date: Fri, 19 Jun 2020 15:58:59 -0400 Subject: [PATCH] Fix ft-input from rewriting itself when search suggestions are active --- src/renderer/components/ft-input/ft-input.js | 6 +++--- src/renderer/components/ft-input/ft-input.vue | 2 +- src/renderer/components/top-nav/top-nav.js | 5 ----- src/renderer/components/top-nav/top-nav.vue | 1 - 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index 91197b1b..1bc81a66 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -49,6 +49,7 @@ export default Vue.extend({ }, mounted: function () { this.id = this._uid + this.inputData = this.value setTimeout(this.addListener, 200) }, @@ -57,9 +58,8 @@ export default Vue.extend({ this.$emit('click', this.inputData) }, - handleInput: function (input) { - this.inputData = input - this.$emit('input', input) + handleInput: function () { + this.$emit('input', this.inputData) }, addListener: function () { diff --git a/src/renderer/components/ft-input/ft-input.vue b/src/renderer/components/ft-input/ft-input.vue index efd890a7..0b938ab2 100644 --- a/src/renderer/components/ft-input/ft-input.vue +++ b/src/renderer/components/ft-input/ft-input.vue @@ -15,7 +15,7 @@ { this.searchSuggestionsDataList = results - this.searchValue = query }) }, getSearchSuggestionsInvidious: function (query) { if (query === '') { this.searchSuggestionsDataList = [] - this.searchValue = '' return } @@ -153,7 +149,6 @@ export default Vue.extend({ this.$store.dispatch('invidiousAPICall', searchPayload).then((results) => { this.searchSuggestionsDataList = results.suggestions - this.searchValue = query }).error((err) => { console.log(err) if (this.backendFallback) { diff --git a/src/renderer/components/top-nav/top-nav.vue b/src/renderer/components/top-nav/top-nav.vue index c005b8e0..6e7b2584 100644 --- a/src/renderer/components/top-nav/top-nav.vue +++ b/src/renderer/components/top-nav/top-nav.vue @@ -40,7 +40,6 @@ class="searchInput" :is-search="true" :data-list="searchSuggestionsDataList" - :value="searchValue" @input="getSearchSuggestionsDebounce" @click="goToSearch" />