From 237025d80ed0f2ca2afdc0f5263e8c8469a7264d Mon Sep 17 00:00:00 2001
From: Dmytro Pinkevych <49400214+pinkevmladchy@users.noreply.github.com>
Date: Thu, 8 Oct 2026 12:18:12 +0300
Subject: [PATCH] Fix device install wizard navigation via stepper header
(#16265)
Clicking a step in the stepper header bypassed nextStep(), so the
Provisioning step was never activated and rendered empty, and the
Configuration form values were not collected. Step activation now runs
on the stepper selectionChange, and instruction steps are marked
completed once shown so the header can move past them like the Next
button does.
---
.../device-install-dialog.component.html | 3 +-
.../device-install-dialog.component.ts | 38 ++++++++++++-------
2 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html
index bb72d65ea3..28e7f61ceb 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html
@@ -190,7 +190,8 @@
+ labelPosition="bottom"
+ (selectionChange)="onStepSelectionChange($event)">
done
diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts
index 7f991316ee..33f2a6d08a 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts
@@ -12,6 +12,7 @@ import { AppState } from '@core/core.state';
import { DialogComponent } from '@shared/components/dialog.component';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatStepper } from '@angular/material/stepper';
+import { StepperSelectionEvent } from '@angular/cdk/stepper';
import { firstValueFrom } from 'rxjs';
import { TranslateService } from '@ngx-translate/core';
import { PageLink } from '@shared/models/page/page-link';
@@ -261,10 +262,7 @@ export class TbDeviceInstallDialogComponent extends DialogComponent {
- this.stepper?.next();
- this.onStepActivated();
- }, 0);
+ setTimeout(() => this.stepper?.next(), 0);
return;
}
this.startWizard();
@@ -315,12 +313,9 @@ export class TbDeviceInstallDialogComponent extends DialogComponent