Skip to content

Commit

Permalink
fix: set initial date on tree provider
Browse files Browse the repository at this point in the history
  • Loading branch information
javierblancoNS committed Sep 3, 2021
1 parent 472bbcd commit 246026c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/components/Tree/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const TreeProvider: FC<TreeProviderProps> = ({
} else {
form.reset();
}

if (!tree?.properties?.date) {
form.setValue("date", null);
}
}, [tree]);

useEffect(() => {
Expand Down

0 comments on commit 246026c

Please sign in to comment.