From 87d6c57174df7c734a7d02ef33f40955dbe6747c Mon Sep 17 00:00:00 2001 From: regexowl Date: Tue, 11 Feb 2025 15:24:04 +0100 Subject: [PATCH] Wizard: Fix nav status icon Status icon rendered only when the step was previously visited, this caused problems with imported blueprints. How to reproduce a bug: 1. import a blueprint with invalid hostname 2. skip to Review Current behaviour: - the Create blueprint button is disabled, but there is no indication of error next to the Hostname step in navigation After fix: - the error status should be rendered next to the Hostname nav item --- .../CreateImageWizard/CreateImageWizard.tsx | 6 ++-- .../utilities/useValidation.tsx | 33 +++++++++++++------ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/Components/CreateImageWizard/CreateImageWizard.tsx b/src/Components/CreateImageWizard/CreateImageWizard.tsx index 18f3e2d7..1930fb43 100644 --- a/src/Components/CreateImageWizard/CreateImageWizard.tsx +++ b/src/Components/CreateImageWizard/CreateImageWizard.tsx @@ -282,16 +282,14 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => { ); // Only this code is different from the original - const status = - (step.isVisited && step.id !== activeStep?.id && step.status) || - 'default'; + const status = (step.id !== activeStep.id && step.status) || 'default'; return (