Skip to content

Commit

Permalink
Merge pull request #10 from City-of-Turku/fix/allow-next-reset
Browse files Browse the repository at this point in the history
Reset allowNext properly
  • Loading branch information
juhomakkonen authored Apr 5, 2024
2 parents dbe7b7a + 314c67b commit 0e085fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Tables/TableCommon/TableCommon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ const TableCommon: React.FC<TableCommonProps> = ({ question }) => {
}, []);

useEffect(() => {
resetAllowNext();
if (!mainOptions.length) {
resetAllowNext();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [mainOptions]);

useEffect(() => {
setOtherCount(otherValue.length);
Expand Down

0 comments on commit 0e085fc

Please sign in to comment.