From 16a8201c1b6993463c4a8beb76b4bd554cc80490 Mon Sep 17 00:00:00 2001 From: Maxwell Barvian Date: Mon, 28 Oct 2024 06:12:56 -0700 Subject: [PATCH] Fix svelte input bug --- .../[...framework]/examples/_Input/svelte/Component.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/src/pages/[...framework]/examples/_Input/svelte/Component.svelte b/site/src/pages/[...framework]/examples/_Input/svelte/Component.svelte index bd2f21dd..3693826d 100644 --- a/site/src/pages/[...framework]/examples/_Input/svelte/Component.svelte +++ b/site/src/pages/[...framework]/examples/_Input/svelte/Component.svelte @@ -26,6 +26,7 @@ if (!isNaN(num) && min <= num && num <= max) next = num } // Manually update the input.value in case the number stays the same e.g. 09 == 9 + console.log(next) input.value = String(next) value = next } @@ -69,7 +70,7 @@ autocomplete="off" inputmode="numeric" {max} - bind:value + {value} oninput={handleInput} />