Skip to content

Commit

Permalink
Merge branch 'main' into fix-hvdc-meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennehomer authored Jul 10, 2024
2 parents 69ca3cb + 410a5db commit 0b411e1
Showing 1 changed file with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ export const SensitivityAnalysisParameters = ({
};
}) ?? [],
};
reset(values);
return values;
},
[reset]
[]
);

const initRowsCount = useCallback(() => {
Expand Down Expand Up @@ -514,6 +514,7 @@ export const SensitivityAnalysisParameters = ({
keepDefaultValues: true,
}
);
initRowsCount();
})
.catch((error) => {
console.error(error);
Expand All @@ -525,13 +526,20 @@ export const SensitivityAnalysisParameters = ({
}
setOpenSelectParameterDialog(false);
},
[snackError, fromSensitivityAnalysisParamsDataToFormValues, reset]
[
snackError,
fromSensitivityAnalysisParamsDataToFormValues,
reset,
initRowsCount,
]
);

useEffect(() => {
if (sensitivityAnalysisParams) {
fromSensitivityAnalysisParamsDataToFormValues(
sensitivityAnalysisParams
reset(
fromSensitivityAnalysisParamsDataToFormValues(
sensitivityAnalysisParams
)
);
!isSubmitAction && initRowsCount();
}
Expand All @@ -540,6 +548,7 @@ export const SensitivityAnalysisParameters = ({
sensitivityAnalysisParams,
initRowsCount,
isSubmitAction,
reset,
]);

const clear = useCallback(() => {
Expand Down

0 comments on commit 0b411e1

Please sign in to comment.