From 922174afa018a7d7bceef14ae1d3984bcea0e5f7 Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Fri, 6 Dec 2024 16:33:00 -0800 Subject: [PATCH] reset --- .../projects/environment-variables/AddDialog.svelte | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/web-admin/src/features/projects/environment-variables/AddDialog.svelte b/web-admin/src/features/projects/environment-variables/AddDialog.svelte index 7e83f03dcbb..13153e03c79 100644 --- a/web-admin/src/features/projects/environment-variables/AddDialog.svelte +++ b/web-admin/src/features/projects/environment-variables/AddDialog.svelte @@ -83,6 +83,7 @@ onResult: ({ result }) => { if (result.type === "success") { open = false; + handleReset(); } }, async onUpdate({ form }) { @@ -162,13 +163,8 @@ } function handleReset() { - // Reset form data to initial state - $form = { - variables: [{ key: "", value: "" }], - }; - // Reset superForm state + $form.variables = [{ key: "", value: "" }]; reset(); - // Reset other state isDevelopment = true; isProduction = true; inputErrors = {};