fix(query-builder): refactor expression tree change emission for consistency - master#17081
Open
IMinchev64 wants to merge 7 commits intomasterfrom
Open
fix(query-builder): refactor expression tree change emission for consistency - master#17081IMinchev64 wants to merge 7 commits intomasterfrom
IMinchev64 wants to merge 7 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
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
expressionTreeChangefromIgxQueryBuilderComponent. - Refactored
IgxQueryBuilderTreeComponentto emit tree changes via a helper method. - Updated tree comparison logic to ignore the
externalObjectproperty.
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. |
projects/igniteui-angular/query-builder/src/query-builder/query-builder.component.ts
Show resolved
Hide resolved
Comment on lines
+330
to
+335
| private serializeExpressionTreeCallback(key: string, val: any) { | ||
| if (key === 'externalObject') { | ||
| return undefined; | ||
| } | ||
|
|
||
| return val; |
There was a problem hiding this comment.
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.
projects/igniteui-angular/query-builder/src/query-builder/query-builder.component.ts
Show resolved
Hide resolved
…com/IgniteUI/igniteui-angular into iminchev/qb-treechange-circular-fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #https://github.com/Infragistics-Developer-Tools/dev-tools/issues/3208
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)