@paperless/angular 2.14.2 → 2.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,11 +96,21 @@ class BaseFormComponent {
96
96
  }
97
97
  control.updateValueAndValidity();
98
98
  }
99
- markAllDirty(formGroup) {
99
+ markAllDirty(control) {
100
100
  this.markedDirty = true;
101
- for (const field of Object.keys(formGroup.controls)) {
102
- const control = formGroup.get(field);
101
+ if (control instanceof FormControl) {
103
102
  this.markControlDirty(control);
103
+ return;
104
+ }
105
+ if (control instanceof FormArray) {
106
+ for (const child of control.controls) {
107
+ this.markControlDirty(child);
108
+ }
109
+ return;
110
+ }
111
+ for (const field of Object.keys(control.controls)) {
112
+ const child = control.get(field);
113
+ this.markControlDirty(child);
104
114
  }
105
115
  }
106
116
  getControlError(control) {