]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / block / rbd-snapshot-form / rbd-snapshot-form-modal.component.ts
index f3665f6d0495e8ee9896aedff800409b6d3b8bf8..a9fb074261e445e3e6bbb94c29c091717b8c43a5 100644 (file)
@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { FormControl, Validators } from '@angular/forms';
+import { UntypedFormControl, Validators } from '@angular/forms';
 
 import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
 import { Observable, Subject } from 'rxjs';
@@ -50,10 +50,10 @@ export class RbdSnapshotFormModalComponent implements OnInit {
 
   createForm() {
     this.snapshotForm = new CdFormGroup({
-      snapshotName: new FormControl('', {
+      snapshotName: new UntypedFormControl('', {
         validators: [Validators.required]
       }),
-      mirrorImageSnapshot: new FormControl(false, {})
+      mirrorImageSnapshot: new UntypedFormControl(false, {})
     });
   }
 
@@ -73,6 +73,7 @@ export class RbdSnapshotFormModalComponent implements OnInit {
     } else {
       this.snapshotForm.get('snapshotName').setValue(this.snapName);
       this.snapshotForm.get('snapshotName').setValidators([Validators.required]);
+      this.snapshotForm.get('snapshotName').updateValueAndValidity();
     }
   }