ets-fe-ng-sdk 20.3.17 → 20.3.18

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.
@@ -6763,18 +6763,32 @@ class FilterFormArrayGroupPipe {
6763
6763
  * @returns Filter function for FormGroups
6764
6764
  */
6765
6765
  this.filterFunc = (queryObject, exactMatch) => (group) => {
6766
+ if (!queryObject || queryObject.length === 0)
6767
+ return true;
6766
6768
  const formGroupValue = group.getRawValue();
6767
6769
  // console.log('formGroupValue', formGroupValue);
6768
- for (const key of queryObject || [])
6769
- if ((key.type == 'string' &&
6770
- (exactMatch
6771
- ? formGroupValue[key.key]?.toLowerCase() == key.value
6772
- : formGroupValue[key.key]
6773
- ?.toLowerCase()
6774
- ?.includes(key.value))) ||
6775
- formGroupValue[key.key] == key.value)
6776
- return true;
6777
- return false;
6770
+ // All conditions must match (AND logic)
6771
+ for (const key of queryObject) {
6772
+ const formValue = formGroupValue[key.key];
6773
+ if (key.type === 'string') {
6774
+ const formValueStr = formValue?.toLowerCase() || '';
6775
+ const keyValueStr = key.value?.toLowerCase() || '';
6776
+ if (exactMatch) {
6777
+ if (formValueStr !== keyValueStr)
6778
+ return false;
6779
+ }
6780
+ else {
6781
+ if (!formValueStr.includes(keyValueStr))
6782
+ return false;
6783
+ }
6784
+ }
6785
+ else {
6786
+ // For non-string types, use strict equality
6787
+ if (formValue !== key.value)
6788
+ return false;
6789
+ }
6790
+ }
6791
+ return true;
6778
6792
  };
6779
6793
  }
6780
6794
  /**
@@ -20898,7 +20912,7 @@ class TableInputComponent extends FormGeneratorComponent {
20898
20912
  /** Whether to use partial matching for filters */
20899
20913
  this.filterLikeMatch = input(...(ngDevMode ? [undefined, { debugName: "filterLikeMatch" }] : []));
20900
20914
  /** Whether to use exact matching for filters (inverse of filterLikeMatch) */
20901
- this.filterExactMatch = computed(() => (this.filterLikeMatch() ? false : true), ...(ngDevMode ? [{ debugName: "filterExactMatch" }] : []));
20915
+ this.filterExactMatch = computed(() => !this.filterLikeMatch(), ...(ngDevMode ? [{ debugName: "filterExactMatch" }] : []));
20902
20916
  /** Whether to show the table */
20903
20917
  this.isShow = input(...(ngDevMode ? [undefined, { debugName: "isShow" }] : []));
20904
20918
  /** The number of items to display per page */