Skip to content

fix(query-builder): refactor expression tree change emission for consistency - master#17081

Open
IMinchev64 wants to merge 7 commits intomasterfrom
iminchev/qb-treechange-circular-fix
Open

fix(query-builder): refactor expression tree change emission for consistency - master#17081
IMinchev64 wants to merge 7 commits intomasterfrom
iminchev/qb-treechange-circular-fix

Conversation

@IMinchev64
Copy link
Contributor

Closes #https://github.com/Infragistics-Developer-Tools/dev-tools/issues/3208

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@IMinchev64 IMinchev64 added the ❌ status: awaiting-test PRs awaiting manual verification label Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 14:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors Query Builder expression tree change emission to be more consistent by emitting a sanitized/serializable expression tree and by centralizing internal tree-change emits.

Changes:

  • Added JSON-based cloning/sanitization of the expression tree before emitting expressionTreeChange from IgxQueryBuilderComponent.
  • Refactored IgxQueryBuilderTreeComponent to emit tree changes via a helper method.
  • Updated tree comparison logic to ignore the externalObject property.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
projects/igniteui-angular/query-builder/src/query-builder/query-builder.component.ts Emits a sanitized/serialized clone of the expression tree on change.
projects/igniteui-angular/query-builder/src/query-builder/query-builder-tree.component.ts Centralizes internal change emission and ignores externalObject during init comparison.

Comment on lines +330 to +335
private serializeExpressionTreeCallback(key: string, val: any) {
if (key === 'externalObject') {
return undefined;
}

return val;
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new serializeExpressionTreeCallback introduces an any-typed parameter. To keep typings strict (and consistent with the rest of this file), consider using unknown (or the built-in JSON.stringify replacer signature types) and adding an explicit return type for the callback.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants