From 18c3d56b689fb9ac4d281ee7d2f2088e02912167 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Sat, 4 Feb 2023 12:08:19 +0530 Subject: [PATCH] fix: allow autocomplete to set and display null values --- src/components/Controls/AutoComplete.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Controls/AutoComplete.vue b/src/components/Controls/AutoComplete.vue index 321289fb..ab65c594 100644 --- a/src/components/Controls/AutoComplete.vue +++ b/src/components/Controls/AutoComplete.vue @@ -108,6 +108,10 @@ export default { option = this.options.find((o) => o.label === value); } + if (!value && option === undefined) { + return null; + } + return option?.label ?? oldValue; }, async updateSuggestions(keyword) {