diff --git a/app/src/ui/client/api/use-entity.ts b/app/src/ui/client/api/use-entity.ts index 907bc33..b77b57d 100644 --- a/app/src/ui/client/api/use-entity.ts +++ b/app/src/ui/client/api/use-entity.ts @@ -156,6 +156,7 @@ export const useEntityQuery = < // mutate all keys of entity by default if (options?.revalidateOnMutate !== false) { + // don't use the id, to also update lists await mutateFn(); } return res; diff --git a/app/src/ui/routes/data/data.$entity.$id.tsx b/app/src/ui/routes/data/data.$entity.$id.tsx index 0b91fa5..a21d444 100644 --- a/app/src/ui/routes/data/data.$entity.$id.tsx +++ b/app/src/ui/routes/data/data.$entity.$id.tsx @@ -77,6 +77,9 @@ function DataEntityUpdateImpl({ params }) { message: `Successfully updated ID ${entityId}`, color: "green", }); + + // make sure form picks up the latest data + Form.reset(); } catch (e) { setError(e instanceof Error ? e.message : "Failed to update"); }