Skip to content

Commit 442d006

Browse files
committed
fix
1 parent a7aab69 commit 442d006

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/components/Wizards/CreateManagedControlPlane/CreateManagedControlPlaneWizardContainer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ export const CreateManagedControlPlaneWizardContainer: FC<CreateManagedControlPl
367367
}
368368
}, [selectedStep]);
369369

370-
// Prepare initial selections for components when editing
370+
// Prepare initial selections for components when editing or duplicating
371371
const initialSelection = useMemo(() => {
372-
if (!isEditMode) return undefined;
372+
if (!isEditMode && !isDuplicateMode) return undefined;
373373
const selection: Record<string, { isSelected: boolean; version: string }> = {};
374374
const componentsMap: MCPComponentsSpec = initialData?.spec.components ?? {};
375375
(Object.keys(componentsMap) as (keyof MCPComponentsSpec)[]).forEach((key) => {
@@ -389,7 +389,7 @@ export const CreateManagedControlPlaneWizardContainer: FC<CreateManagedControlPl
389389
}
390390
});
391391
return selection;
392-
}, [isEditMode, initialData]);
392+
}, [isEditMode, isDuplicateMode, initialData]);
393393

394394
// Prefill form when editing
395395
useEffect(() => {

src/components/Wizards/CreateManagedControlPlane/SummarizeStep.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export const SummarizeStep: React.FC<SummarizeStepProps> = ({
7979
/>
8080
) : (
8181
<YamlViewer
82-
originalYamlString={originalYamlString}
8382
yamlString={stringify(
8483
CreateManagedControlPlane(
8584
watch('name'),

0 commit comments

Comments
 (0)