diff --git a/src/app/_components/update-task-sheet.tsx b/src/app/_components/update-task-sheet.tsx index 6b9e33df..f1655589 100644 --- a/src/app/_components/update-task-sheet.tsx +++ b/src/app/_components/update-task-sheet.tsx @@ -56,6 +56,15 @@ export function UpdateTaskSheet({ task, ...props }: UpdateTaskSheetProps) { }, }) + React.useEffect(() => { + form.reset({ + title: task.title ?? "", + label: task.label, + status: task.status, + priority: task.priority, + }) + }, [task, form]) + function onSubmit(input: UpdateTaskSchema) { startUpdateTransition(async () => { const { error } = await updateTask({