From 999abd1d1e475954398bb84c15bbe49149669cd7 Mon Sep 17 00:00:00 2001 From: Sirttas Date: Sun, 16 Aug 2026 09:13:22 +0200 Subject: [PATCH] fix(#24): Fix item select --- src/components/SelectInput.vue | 2 +- src/market/type/MarketTypeInput.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/SelectInput.vue b/src/components/SelectInput.vue index 0785941..17976c7 100644 --- a/src/components/SelectInput.vue +++ b/src/components/SelectInput.vue @@ -43,7 +43,7 @@ const select = (item?: T) => { const submit = () => { if (currentIndex.value >= 0 && currentIndex.value < props.items.length) { select(props.items[currentIndex.value]); - } else if (modelValue.value === undefined && props.items.length > 0) { + } else if (props.items.length > 0) { select(props.items[0]); } }; diff --git a/src/market/type/MarketTypeInput.vue b/src/market/type/MarketTypeInput.vue index 9d37962..e3b3665 100644 --- a/src/market/type/MarketTypeInput.vue +++ b/src/market/type/MarketTypeInput.vue @@ -55,7 +55,7 @@ const submit = async () => { select(v); await nextTick(); - } else if (modelValue.value === undefined && suggestions.value.length > 0) { + } else if (suggestions.value.length > 0) { select(suggestions.value[0]); await nextTick(); } @@ -92,7 +92,7 @@ watchEffect(async () => { -
+