Skip to content

Commit

Permalink
fix(frontend): fix missing dep in useEffect in TestSpec form (#2696)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeepc committed Jun 9, 2023
1 parent 81e6df1 commit 05e2327
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions web/src/components/TestSpecForm/TestSpecForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,12 @@ const TestSpecForm = ({
}, []);

useEffect(() => {
if (!isEditing) {
form.setFieldsValue({
selector,
name,
assertions,
});
}
}, [form, isEditing, name, selector]);
form.setFieldsValue({
selector,
name,
assertions,
});
}, [assertions, form, name, selector]);

const selectorSuggestions = useAppSelector(TestSpecsSelectors.selectSelectorSuggestions);
const prevSelector = useAppSelector(TestSpecsSelectors.selectPrevSelector);
Expand Down

0 comments on commit 05e2327

Please sign in to comment.