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 = {};