From b202ec85e51a56be36c6b31bceaae137a4a26d0f Mon Sep 17 00:00:00 2001 From: vallode <18506096+vallode@users.noreply.github.com> Date: Fri, 13 May 2022 03:16:14 +0200 Subject: [PATCH] Remove input event emitting to reset search field (#2108) --- src/renderer/components/ft-input/ft-input.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index 659eb5e4..d809bb92 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -139,10 +139,11 @@ export default Vue.extend({ this.inputData = '' this.handleActionIconChange() this.updateVisibleDataList() - this.$emit('input', this.inputData) + + const inputElement = document.getElementById(this.id) + inputElement.value = '' // Focus on input element after text is clear for better UX - const inputElement = document.getElementById(this.id) inputElement.focus() },