Skip to content

Commit

Permalink
Reverting the validation step when a patrol task form is rendered (#1013
Browse files Browse the repository at this point in the history
)

* Reverting the validation step when a patrol task form is rendered, which fixes 1012

Signed-off-by: Aaron Chong <[email protected]>

* Lint

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth authored Sep 27, 2024
1 parent 9f1b3c3 commit 03d747d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-components/lib/tasks/types/patrol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ export function PatrolTaskForm({
onChange(desc);
};

React.useEffect(() => {
onValidate(isPatrolTaskDescriptionValid(taskDesc));
}, [onValidate, taskDesc]);

return (
<Grid container spacing={theme.spacing(2)} justifyContent="center" alignItems="center">
<Grid item xs={isScreenHeightLessThan800 ? 8 : 10}>
Expand Down

0 comments on commit 03d747d

Please sign in to comment.