@coolon/angular-ui-powerups 13.1.4 → 13.1.6

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.
@@ -2695,7 +2695,7 @@ class ColumnModel extends GarbageCollector {
2695
2695
  return this.columnId;
2696
2696
  }
2697
2697
  get isTextMatch() {
2698
- return this._columnModelTextSearchPredicate || this._cellRendererTextSearchPredicate || DEFAULT_TEXT_SEARCH_PREDICATE;
2698
+ return this._cellRendererTextSearchPredicate ?? this._columnModelTextSearchPredicate ?? DEFAULT_TEXT_SEARCH_PREDICATE;
2699
2699
  }
2700
2700
  /**
2701
2701
  * Sets the predicate to use when checking if the specified row is a text match for this column.
@@ -2757,8 +2757,11 @@ class ColumnModel extends GarbageCollector {
2757
2757
  onRendererAttached(host, ref) {
2758
2758
  const component = this.getComponentOrEmbeddedView(ref);
2759
2759
  this._cellRendererPortalRef.onPortalAttached(host, component);
2760
- if (isFunction(component?.matches)) {
2760
+ if (ref instanceof CellRendererPortalRef && isFunction(component?.matches)) {
2761
+ // we've had the case where we were calling matches on disposed components, so we have
2762
+ // to make sure we only handle matches on components that we can track destroys.
2761
2763
  this._cellRendererTextSearchPredicate = (row, text) => component.matches(row, text);
2764
+ ref.onDestroy(() => this._cellRendererTextSearchPredicate = undefined);
2762
2765
  }
2763
2766
  else {
2764
2767
  this._cellRendererTextSearchPredicate = undefined;