diff --git a/web/src/components/TaskItem.tsx b/web/src/components/TaskItem.tsx index faa1b8f..e4bac37 100644 --- a/web/src/components/TaskItem.tsx +++ b/web/src/components/TaskItem.tsx @@ -69,6 +69,10 @@ export function TaskItem({ task, subtasks = [], depth = 0 }: TaskItemProps) { // Sync state when task prop changes useEffect(() => { + // The edit fields are local drafts reset from the task the list reloads. + // Flagged since eslint-plugin-react-hooks 7.1 (#171); deriving the drafts + // from props instead is a refactor outside a dependency bump. + // eslint-disable-next-line react-hooks/set-state-in-effect setTitle(task.title); setNotes(task.notes || ""); setPriority(task.priority);