@lenne.tech/ng-base 14.13.1 → 14.13.2

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.
@@ -1972,14 +1972,23 @@ class FormsService {
1972
1972
  });
1973
1973
  }
1974
1974
  findInvalidControls(formGroup) {
1975
- const invalid = [];
1975
+ return this.getInvalidControl(formGroup);
1976
+ }
1977
+ getInvalidControl(formGroup, invalid) {
1978
+ let result = invalid ? [...invalid] : [];
1976
1979
  const controls = formGroup.controls;
1977
1980
  Object.keys(formGroup.controls).forEach((name) => {
1981
+ var _a;
1978
1982
  if (controls[name].invalid) {
1979
- invalid.push(name);
1983
+ if ((_a = controls[name]) === null || _a === void 0 ? void 0 : _a.controls) {
1984
+ result = this.getInvalidControl(controls[name], result);
1985
+ }
1986
+ else {
1987
+ result.push(name);
1988
+ }
1980
1989
  }
1981
1990
  });
1982
- return invalid;
1991
+ return result;
1983
1992
  }
1984
1993
  scrollToInvalidControl(form) {
1985
1994
  const invalidForm = this.findInvalidControls(form)[0];