From 93550ae3f1658a3273f0c5fb80552c43cf840752 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Wed, 1 May 2024 22:59:54 +0800 Subject: [PATCH] update edit shortener form to not invalidate all after submit --- .../src/routes/(app)/links/[id]/edit/(components)/form.svelte | 4 ++-- .../[id]/links/[linkid]/edit/(components)/form.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte b/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte index 3f14272..6507b75 100644 --- a/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte +++ b/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte @@ -22,8 +22,8 @@ const form = superForm(data, { validators: zodClient(formSchema), - invalidateAll: 'force', - resetForm: true, + invalidateAll: false, + resetForm: false, onResult: ({ result }) => { if (result.status === 200) { toast.success('Project shortener updated') diff --git a/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte b/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte index a7ff294..8309713 100644 --- a/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte +++ b/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte @@ -18,8 +18,8 @@ const form = superForm(data, { validators: zodClient(formSchema), - invalidateAll: 'force', - resetForm: true, + invalidateAll: false, + resetForm: false, onResult: ({ result }) => { if (result.status === 200) { toast.success('Project shortener updated')