Skip to content

Commit a0974d6

Browse files
committed
fix(tables): symmetric guarded onSettled across row write mutations
1 parent 10ec81d commit a0974d6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/sim/hooks/queries/tables.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,11 +594,13 @@ export function useUpdateTableRow({ workspaceId, tableId }: RowMutationContext)
594594
queryClient.setQueryData(queryKey, data)
595595
}
596596
}
597+
if (isValidationError(error)) return
598+
toast.error(error.message, { duration: 5000 })
599+
},
600+
onSettled: () => {
597601
if (queryClient.isMutating({ mutationKey: tableKeys.rowWrites(tableId) }) === 1) {
598602
invalidateRowData(queryClient, tableId)
599603
}
600-
if (isValidationError(error)) return
601-
toast.error(error.message, { duration: 5000 })
602604
},
603605
})
604606
}

0 commit comments

Comments
 (0)