@abp/ng.core 10.2.0-rc.1 → 10.2.0-rc.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.
@@ -3948,14 +3948,14 @@ class ForDirective {
3948
3948
  this.vcRef = inject(ViewContainerRef);
3949
3949
  this.differs = inject(IterableDiffers);
3950
3950
  // eslint-disable-next-line @angular-eslint/no-input-rename
3951
- this.items = input.required({ ...(ngDevMode ? { debugName: "items" } : {}), alias: "abpForOf" });
3952
- this.orderBy = input(undefined, { ...(ngDevMode ? { debugName: "orderBy" } : {}), alias: "abpForOrderBy" });
3953
- this.orderDir = input(undefined, { ...(ngDevMode ? { debugName: "orderDir" } : {}), alias: "abpForOrderDir" });
3954
- this.filterBy = input(undefined, { ...(ngDevMode ? { debugName: "filterBy" } : {}), alias: "abpForFilterBy" });
3955
- this.filterVal = input(undefined, { ...(ngDevMode ? { debugName: "filterVal" } : {}), alias: "abpForFilterVal" });
3956
- this.trackBy = input(undefined, { ...(ngDevMode ? { debugName: "trackBy" } : {}), alias: "abpForTrackBy" });
3957
- this.compareBy = input(undefined, { ...(ngDevMode ? { debugName: "compareBy" } : {}), alias: "abpForCompareBy" });
3958
- this.emptyRef = input(undefined, { ...(ngDevMode ? { debugName: "emptyRef" } : {}), alias: "abpForEmptyRef" });
3951
+ this.items = input.required({ ...(ngDevMode ? { debugName: "items" } : {}), alias: 'abpForOf' });
3952
+ this.orderBy = input(undefined, { ...(ngDevMode ? { debugName: "orderBy" } : {}), alias: 'abpForOrderBy' });
3953
+ this.orderDir = input(undefined, { ...(ngDevMode ? { debugName: "orderDir" } : {}), alias: 'abpForOrderDir' });
3954
+ this.filterBy = input(undefined, { ...(ngDevMode ? { debugName: "filterBy" } : {}), alias: 'abpForFilterBy' });
3955
+ this.filterVal = input(undefined, { ...(ngDevMode ? { debugName: "filterVal" } : {}), alias: 'abpForFilterVal' });
3956
+ this.trackBy = input(undefined, { ...(ngDevMode ? { debugName: "trackBy" } : {}), alias: 'abpForTrackBy' });
3957
+ this.compareBy = input(undefined, { ...(ngDevMode ? { debugName: "compareBy" } : {}), alias: 'abpForCompareBy' });
3958
+ this.emptyRef = input(undefined, { ...(ngDevMode ? { debugName: "emptyRef" } : {}), alias: 'abpForEmptyRef' });
3959
3959
  this.lastItemsRef = null;
3960
3960
  }
3961
3961
  get compareFn() {
@@ -4040,21 +4040,13 @@ class ForDirective {
4040
4040
  const itemsValue = this.items();
4041
4041
  if (!itemsValue)
4042
4042
  return;
4043
- // Recreate differ if items array reference changed
4044
- if (this.lastItemsRef !== itemsValue) {
4045
- this.vcRef.clear();
4046
- this.differ = null;
4047
- this.lastItemsRef = itemsValue;
4048
- }
4049
4043
  let items = clone(itemsValue);
4050
4044
  if (!Array.isArray(items))
4051
4045
  return;
4052
4046
  const compareFn = this.compareFn;
4053
4047
  const filterBy = this.filterBy();
4054
4048
  const filterVal = this.filterVal();
4055
- if (typeof filterBy !== 'undefined' &&
4056
- typeof filterVal !== 'undefined' &&
4057
- filterVal !== '') {
4049
+ if (typeof filterBy !== 'undefined' && typeof filterVal !== 'undefined' && filterVal !== '') {
4058
4050
  items = items.filter(item => compareFn(item[filterBy], this.filterVal()));
4059
4051
  }
4060
4052
  switch (this.orderDir()) {