@eherve/angular-material-datatable 22.2.4 → 22.2.5

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.
@@ -2949,8 +2949,6 @@ var HeaderSelectFilterComponent = class HeaderSelectFilterComponent {
2949
2949
  }));
2950
2950
  if (Array.isArray(this.column.options)) this.buildOptions(this.column.options);
2951
2951
  else this.subsink.add(this.selectOptionsCache.resolve(this.column.options).subscribe((data) => {
2952
- this.options = [];
2953
- this.groups = [];
2954
2952
  this.buildOptions(data);
2955
2953
  }));
2956
2954
  this.changeDetectorRef.detectChanges();
@@ -2959,8 +2957,9 @@ var HeaderSelectFilterComponent = class HeaderSelectFilterComponent {
2959
2957
  this.subsink.unsubscribe();
2960
2958
  }
2961
2959
  buildOptions(data) {
2962
- data.forEach((d) => {
2963
- this.options.push(d);
2960
+ this.options = [...data];
2961
+ this.groups = [];
2962
+ this.options.forEach((d) => {
2964
2963
  const name = d.group ?? "";
2965
2964
  const group = this.groups.find((g) => g.name === name);
2966
2965
  if (!group) this.groups.push({
@@ -2969,6 +2968,7 @@ var HeaderSelectFilterComponent = class HeaderSelectFilterComponent {
2969
2968
  });
2970
2969
  else group.options.push(d);
2971
2970
  });
2971
+ this.changeDetectorRef.markForCheck();
2972
2972
  }
2973
2973
  isEmptyValue(value) {
2974
2974
  return value === null || value === void 0 || value === "" || Array.isArray(value) && !value.length;