From: Sagar Gopale Date: Fri, 13 Mar 2026 05:57:39 +0000 (+0530) Subject: mgr/dashboard: fix-nvmeof-subsystem-create-firefox-next X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05db484cb69fa9b66b1fda246bc9a7b8b5c340a7;p=ceph.git mgr/dashboard: fix-nvmeof-subsystem-create-firefox-next Fixes: https://tracker.ceph.com/issues/75434 Signed-off-by: Sagar Gopale --- 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 });