From 328a89e4fda8fd5123a2a1ff753ba9b954807991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Javier=20Amigo?= <111904856+eldoctormail@users.noreply.github.com> Date: Sat, 6 Jun 2026 22:05:24 -0300 Subject: [PATCH] Set inputValue from task value and add effect Initialize inputValue with task value and update on task change. --- mobile/components/SingleTask.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mobile/components/SingleTask.tsx b/mobile/components/SingleTask.tsx index 0776e65f5..52f153c54 100644 --- a/mobile/components/SingleTask.tsx +++ b/mobile/components/SingleTask.tsx @@ -43,7 +43,7 @@ export default function SingleTask({ const { t }: { t: any } = useTranslation(); const [savingNotes, setSavingNotes] = useState(false); const { user, hasCreatePermission, hasFeature } = useAuth(); - const [inputValue, setInputValue] = useState(''); + const [inputValue, setInputValue] = useState(task.value?.toString() || ''); const changeHandler = (newValue: string) => { if (!preview) { let formattedValue = newValue; @@ -62,6 +62,11 @@ export default function SingleTask({ () => debounce(changeHandler, 1000), [] ); + + useEffect(() => { + setInputValue(task.value?.toString() || ''); +}, [task.value]); + const onDropdownValueChange = (value) => { !preview && !(task.taskBase.user && task.taskBase.user.id !== user.id) &&