Browse Source

fix(iot-hub): fix empty provisioning step in review mode

The provisioning step content (entity list) was empty because
onStepActivated() was only called for the initial step. When the
user clicked on the Provisioning step directly, nothing triggered
the content initialization.

Fix: listen to mat-stepper selectionChange event to call
onStepActivated() whenever the user navigates between steps.
Also disable linear mode in review mode so all steps are freely
clickable.
pull/15508/head
Andrii Shvaika 6 months ago
parent
commit
789c27bfe0
  1. 5
      ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html
  2. 4
      ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts

5
ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html

@ -60,8 +60,9 @@
<!-- Stepper wizard -->
<div class="tb-device-install-stepper-container">
<mat-horizontal-stepper #installStepper
[linear]="true"
labelPosition="bottom">
[linear]="!reviewMode"
labelPosition="bottom"
(selectionChange)="onStepChanged()">
<ng-template matStepperIcon="edit">
<mat-icon>done</mat-icon>
</ng-template>

4
ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts

@ -186,6 +186,10 @@ export class TbDeviceInstallDialogComponent extends DialogComponent<TbDeviceInst
this.selectedConnectivity = ct;
}
onStepChanged(): void {
this.onStepActivated();
}
confirmConnectivity(): void {
if (!this.selectedConnectivity) {
return;

Loading…
Cancel
Save