]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix-nvmeof-subsystem-create-firefox-next 67769/head
authorSagar Gopale <sagar.gopale@ibm.com>
Fri, 13 Mar 2026 05:57:39 +0000 (11:27 +0530)
committerSagar Gopale <sagar.gopale@ibm.com>
Fri, 13 Mar 2026 05:57:39 +0000 (11:27 +0530)
Fixes: https://tracker.ceph.com/issues/75434
Signed-off-by: Sagar Gopale <sagar.gopale@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/components/tearsheet/tearsheet.component.ts

index 99fdbfa1f200050e45ad770dc35fcf36e66c5392..f6d5cb51625a950d77e5dec883c0943f78cfd676 100644 (file)
@@ -154,8 +154,13 @@ export class TearsheetComponent implements OnInit, AfterViewInit, OnDestroy {
   }
 
   onNext() {
-    const formEl = document.querySelector('form');
-    formEl?.dispatchEvent(new Event('submit', { bubbles: true }));
+    const currentForm = this.stepContents?.toArray()?.[this.currentStep]?.stepComponent?.formGroup;
+    currentForm?.markAllAsTouched();
+    currentForm?.updateValueAndValidity({ emitEvent: true });
+    if (currentForm) {
+      this._updateStepInvalid(this.currentStep, currentForm.invalid);
+    }
+
     if (this.currentStep !== this.lastStep && !this.steps[this.currentStep].invalid) {
       this.currentStep = this.currentStep + 1;
       this.stepChanged.emit({ current: this.currentStep });