Skip to content

Commit

Permalink
fix (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
realtydev authored Jul 30, 2024
1 parent 3a091fe commit 8ba85e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/_components/update-task-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 8ba85e1

Please sign in to comment.