From 05db484cb69fa9b66b1fda246bc9a7b8b5c340a7 Mon Sep 17 00:00:00 2001 From: Sagar Gopale Date: Fri, 13 Mar 2026 11:27:39 +0530 Subject: [PATCH] mgr/dashboard: fix-nvmeof-subsystem-create-firefox-next Fixes: https://tracker.ceph.com/issues/75434 Signed-off-by: Sagar Gopale --- .../shared/components/tearsheet/tearsheet.component.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/tearsheet/tearsheet.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/tearsheet/tearsheet.component.ts index 99fdbfa1f20..f6d5cb51625 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/tearsheet/tearsheet.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/tearsheet/tearsheet.component.ts @@ -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 }); -- 2.47.3