From 9eda222f939ba2d57869342bb3c4ceea64e037b6 Mon Sep 17 00:00:00 2001 From: nichenqin Date: Sat, 31 Aug 2024 11:08:06 +0800 Subject: [PATCH] fix: update field ux --- .../lib/components/blocks/update-field/update-field.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/lib/components/blocks/update-field/update-field.svelte b/apps/frontend/src/lib/components/blocks/update-field/update-field.svelte index 544931cd9..5f6c53ee9 100644 --- a/apps/frontend/src/lib/components/blocks/update-field/update-field.svelte +++ b/apps/frontend/src/lib/components/blocks/update-field/update-field.svelte @@ -64,7 +64,7 @@ onSubmit(input) { validateForm({ update: true }) }, - onUpdate(event) { + async onUpdate(event) { if (!event.form.valid) { console.log(event.form.errors, event.form.data) return @@ -72,7 +72,7 @@ const data = event.form.data const field = FieldFactory.fromJSON(data).toJSON() - $updateFieldMutation.mutate({ + await $updateFieldMutation.mutateAsync({ tableId: $table.id.value, field, }) @@ -125,7 +125,7 @@ {#if $updateFieldMutation.isPending} {:else} - + {/if} Update Field