Skip to content

Commit

Permalink
fix: update field ux
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Aug 31, 2024
1 parent 0cef3e4 commit 9eda222
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@
onSubmit(input) {
validateForm({ update: true })
},
onUpdate(event) {
async onUpdate(event) {
if (!event.form.valid) {
console.log(event.form.errors, event.form.data)
return
}
const data = event.form.data
const field = FieldFactory.fromJSON(data).toJSON()
$updateFieldMutation.mutate({
await $updateFieldMutation.mutateAsync({
tableId: $table.id.value,
field,
})
Expand Down Expand Up @@ -125,7 +125,7 @@
{#if $updateFieldMutation.isPending}
<LoaderCircleIcon class="mr-2 h-5 w-5 animate-spin" />
{:else}
<PencilIcon class="mr-2 h-5 w-5" />
<PencilIcon class="mr-2 h-4 w-4" />
{/if}
Update Field
</Button>
Expand Down

0 comments on commit 9eda222

Please sign in to comment.