Skip to content

Commit

Permalink
Set switch value when returning to the form
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 committed Oct 25, 2022
1 parent bf24ff2 commit 948a7e3
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ export const SelectPackages: React.FC<SelectPackagesProps> = ({
}
}, [analysisContext, applicationPackages, getDefaultSelectedPackages]);

useEffect(() => {
if (analysisContext && analysisContext.includePackages.length > 0) {
setEnablePackageSelection(true);
}
}, [analysisContext]);

const handleOnSelectedPackagesChange = (value: string[]) => {
if (!analysisContext || !packages) {
return;
Expand Down

0 comments on commit 948a7e3

Please sign in to comment.