From a9ac6a236590b2dc0598fe51a3ffe054a484cb0f Mon Sep 17 00:00:00 2001 From: Oluwatobiloba Promise Temitope Date: Sat, 17 Oct 2026 15:37:38 +0300 Subject: [PATCH] fix(tasks): keep the cooldown field out of the form library's reach The cooldown input passed its DOM ref to react-hook-form, which wrote raw seconds into it (a new repeatable task showed 86400) and could read its text back. The input now keeps its own text and only hands the parsed seconds to the form. --- src/components/admin/task/fields.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/admin/task/fields.tsx b/src/components/admin/task/fields.tsx index 25450b6..3c84e1a 100644 --- a/src/components/admin/task/fields.tsx +++ b/src/components/admin/task/fields.tsx @@ -63,20 +63,13 @@ export const TaskFields: FC = ({ categories }) => { )} {completionPolicy(policy).usesCooldown && ( - - typeof value === "number" - ? value - : (parseCooldownInput(String(value)) ?? Number.NaN), - }} - > + {(field) => ( <>