]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix-nvmeof-subsystem-create-firefox-next
authorSagar Gopale <sagar.gopale@ibm.com>
Fri, 13 Mar 2026 05:57:39 +0000 (11:27 +0530)
committerAfreen Misbah <afreen@ibm.com>
Wed, 29 Apr 2026 07:42:25 +0000 (13:12 +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 ff4bed521f0db69f9ea40dcfc428e2367e5e4101..20552d1862bc4e8c602f9e288ab70394cbeb42d7 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 });