Skip to content

Commit

Permalink
Merge pull request #1421 from sgratch/set-plan-name-field-init-valida…
Browse files Browse the repository at this point in the history
…tion-value-to-default

Initilalize the validation value of the 'plan name' field to default instead of error
  • Loading branch information
sgratch authored Jan 2, 2025
2 parents b37b717 + 990f13e commit f79044c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export const PlanCreatePage: React.FC<{ namespace: string }> = ({ namespace }) =
!emptyContext &&
!(
!!state?.flow?.apiError ||
Object.values(state?.validation || []).some((validation) => validation === 'error')
Object.values(state?.validation || []).some((validation) => validation === 'error') ||
state?.validation?.planName === 'default'
),
canJumpTo: filterState?.selectedVMs?.length > 0,
nextButtonText: 'Create migration plan',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ const handlers: {
) {
// triggered from useEffect on any data change
draft.existingResources.plans = existingPlans;
draft.validation.planName = validatePlanName(
draft.underConstruction.plan.metadata.name,
existingPlans,
);
},
[SET_AVAILABLE_TARGET_NAMESPACES](
draft,
Expand Down

0 comments on commit f79044c

Please sign in to comment.