From 246026c3957515547b038dec6fd835f2a3bd4024 Mon Sep 17 00:00:00 2001 From: Javi Blanco Date: Fri, 3 Sep 2021 11:18:06 +0200 Subject: [PATCH] fix: set initial date on tree provider --- frontend/components/Tree/Provider.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/components/Tree/Provider.tsx b/frontend/components/Tree/Provider.tsx index 2f16f628..977668eb 100644 --- a/frontend/components/Tree/Provider.tsx +++ b/frontend/components/Tree/Provider.tsx @@ -46,6 +46,10 @@ const TreeProvider: FC = ({ } else { form.reset(); } + + if (!tree?.properties?.date) { + form.setValue("date", null); + } }, [tree]); useEffect(() => {