From f4b14bc0da3d397d9fb2ff05f2c3f9dea90f5ee5 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Thu, 25 Nov 2021 15:47:47 +0530 Subject: [PATCH] fix(ux): unset link value if no matches --- src/components/Controls/AutoComplete.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Controls/AutoComplete.vue b/src/components/Controls/AutoComplete.vue index de44f2f8..a5aba264 100644 --- a/src/components/Controls/AutoComplete.vue +++ b/src/components/Controls/AutoComplete.vue @@ -125,10 +125,11 @@ export default { const suggestion = await this.getSuggestions(value); if (suggestion.length < 2) { - return; + this.linkValue = ''; + this.triggerChange(''); + } else { + this.setSuggestion(suggestion[0]); } - - this.setSuggestion(suggestion[0]); } }, onInput(e) {