From 76e6eb5af88508bd37db5dfc471b161e278df799 Mon Sep 17 00:00:00 2001 From: adro Date: Tue, 31 Oct 2023 22:39:44 +0100 Subject: [PATCH] Fix DropdownInput differentiating num/string keys --- client/src/components/inputs/DropdownInput.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/inputs/DropdownInput.vue b/client/src/components/inputs/DropdownInput.vue index 78db4fa..0ae123b 100644 --- a/client/src/components/inputs/DropdownInput.vue +++ b/client/src/components/inputs/DropdownInput.vue @@ -127,7 +127,7 @@ function focusIn() { function toggle(key: any) { if (multiple) { const mv = modelValue as Index[]; - if (mv?.includes(key)) mv?.splice(mv?.indexOf(key), 1); + if (mv?.some((x: Index) => x == key)) mv?.splice(mv?.indexOf(key), 1); else mv?.push(key); return; } @@ -205,10 +205,10 @@ function handleKeydown(e: KeyboardEvent) {