Skip to content

Commit

Permalink
Fix update payload
Browse files Browse the repository at this point in the history
  • Loading branch information
akmatoff committed Apr 26, 2024
1 parent 8ed6e32 commit cf69e1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/tasks/TaskDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ function TaskDetails() {

useEffect(() => {
if (existingTask && id) {
taskForm.reset(existingTask);
taskForm.reset({
text: existingTask.text,
topicId: existingTask.topicId,
answers: existingTask.answers,
tip: existingTask.tip,
image: existingTask.image,
});
setActiveValue({
label: existingTask.topic.title,
value: existingTask.topic.id.toString(),
Expand Down

0 comments on commit cf69e1d

Please sign in to comment.