From fb26be7dd6295a429157e7b047ad1eb5b97e4003 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 17 Jun 2025 14:24:23 +0400 Subject: [PATCH] fix: confirm dialog input reset on show --- src/lib/components/common/ConfirmDialog.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/components/common/ConfirmDialog.svelte b/src/lib/components/common/ConfirmDialog.svelte index 29efc59e4a..baf4efb618 100644 --- a/src/lib/components/common/ConfirmDialog.svelte +++ b/src/lib/components/common/ConfirmDialog.svelte @@ -25,11 +25,19 @@ export let show = false; + $: if (show) { + init(); + } + let modalElement = null; let mounted = false; let focusTrap: FocusTrap.FocusTrap | null = null; + const init = () => { + inputValue = ''; + }; + const handleKeyDown = (event: KeyboardEvent) => { if (event.key === 'Escape') { console.log('Escape');