From 739c45805ae48616f68da85225535a8a6e8ca7bc Mon Sep 17 00:00:00 2001 From: Henrik Askjer <henrik.askjer@uib.no> Date: Wed, 29 Sep 2021 14:35:43 +0200 Subject: [PATCH] No need for whitespace if placeholder is the only option --- src/components/Autocomplete.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Autocomplete.vue b/src/components/Autocomplete.vue index 3aac7c12..77698551 100644 --- a/src/components/Autocomplete.vue +++ b/src/components/Autocomplete.vue @@ -83,10 +83,11 @@ if (/_|\*|\|/.test(q)) { search = 2 } - this.items.splice(0,1, {q: q, match: q, label: q+" ", time: time, search: search}) + this.items.splice(0,1, {q: q, match: q, label: q, time: time, search: search}) } } else { + // Whitespace necessary in case option already exists in dropdown this.items.push({q: q, match: q, label: q+" ", time: time, search: search}) } let self = this -- GitLab