Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions projects/igniteui-angular-elements/src/app/custom-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ComponentConfig, ContentQueryMeta } from './component-config';

import { ComponentNgElementStrategy, ComponentNgElementStrategyFactory, extractProjectableNodes } from './ng-element-strategy';
import { TemplateWrapperComponent } from './wrapper/wrapper.component';
import { IExpressionTree, IFilteringExpression } from 'igniteui-angular';

export const ComponentRefKey = Symbol('ComponentRef');
const SCHEDULE_DELAY = 10;
Expand Down Expand Up @@ -451,11 +452,30 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
}

protected patchOutputComponents(eventName: string, eventArgs: any) {
// Single out only `columnInit` event for now. If more events pop up will require a config generation.
if (eventName !== "columnInit") {
if (eventName === 'filteringExpressionsTreeChange' || eventName === 'expressionTreeChange' || eventName === 'advancedFilteringExpressionsTreeChange') {
this.stripExternalObject(eventArgs);
return eventArgs;
}
return this.createProxyForComponentValue(eventArgs, 1).value;
// Single out only `columnInit` event for now. If more events pop up will require a config generation.
if (eventName === "columnInit") {
return this.createProxyForComponentValue(eventArgs, 1).value;
}
return eventArgs;
}

protected stripExternalObject(tree: IExpressionTree): void {
for (const operand of tree?.filteringOperands ?? []) {
if ('operator' in operand) {
this.stripExternalObject(operand);
continue;
}

delete (operand.condition as any)?.externalObject;

if ((operand as IFilteringExpression).searchTree) {
this.stripExternalObject(operand.searchTree);
}
}
Comment thread
IMinchev64 marked this conversation as resolved.
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
this.cancelOperandEdit();

// Ignore values of certain properties for the comparison
const propsToIgnore = ['parent', 'hovered', 'ignoreCase', 'inEditMode', 'inAddMode'];
const propsToIgnore = ['parent', 'hovered', 'ignoreCase', 'inEditMode', 'inAddMode', 'externalObject'];
const propsReplacer = function replacer(key, value) {
if (propsToIgnore.indexOf(key) >= 0) {
return undefined;
Expand Down
Loading