@tetacom/ng-components 1.0.44 → 1.0.45

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.
@@ -3035,7 +3035,7 @@ class ArrayUtil {
3035
3035
  }
3036
3036
  return null;
3037
3037
  }
3038
- static filterRecursive(array, filter, children = 'children', keepChildren = true) {
3038
+ static filterRecursive(array, filter, children = 'children', keepChildren = true, fullscanChildren = false) {
3039
3039
  const result = [];
3040
3040
  if (array && array.length) {
3041
3041
  for (const item of array) {
@@ -3044,12 +3044,15 @@ class ArrayUtil {
3044
3044
  result.push(resultItem);
3045
3045
  if (!keepChildren) {
3046
3046
  resultItem[children] = [];
3047
+ if (fullscanChildren) {
3048
+ continue;
3049
+ }
3047
3050
  break;
3048
3051
  }
3049
3052
  }
3050
3053
  else if (item[children] && item[children].length > 0) {
3051
3054
  resultItem[children] = [];
3052
- const found = ArrayUtil.filterRecursive(item[children], filter, children, keepChildren);
3055
+ const found = ArrayUtil.filterRecursive(item[children], filter, children, keepChildren, fullscanChildren);
3053
3056
  if (found?.length > 0) {
3054
3057
  resultItem[children] = found;
3055
3058
  result.push(resultItem);