Skip to content

Commit 8852677

Browse files
committed
feat(query-builder): fix current group change on new group creation
1 parent 73e3019 commit 8852677

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/igniteui-angular/src/lib/query-builder/query-builder-tree.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,8 +1662,8 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
16621662
this.cancelOperandEdit();
16631663

16641664
// Ignore values of 'parent' and 'hovered' properties for the comparison
1665-
const parentPropReplacer = function replacer(key, value) {
1666-
if (key === "parent" || key === "hovered") {
1665+
const propsReplacer = function replacer(key, value) {
1666+
if (key === "parent" || key === "hovered" || key === "ignoreCase" || key === "inEditMode") {
16671667
return undefined;
16681668
} else {
16691669
return value;
@@ -1672,7 +1672,7 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
16721672

16731673
// Skip root being recreated if the same
16741674
const newRootGroup = this.createExpressionGroupItem(this.expressionTree);
1675-
if (JSON.stringify(this.rootGroup, parentPropReplacer) !== JSON.stringify(newRootGroup, parentPropReplacer)) {
1675+
if (JSON.stringify(this.rootGroup, propsReplacer) !== JSON.stringify(newRootGroup, propsReplacer)) {
16761676
this.rootGroup = this.createExpressionGroupItem(this.expressionTree);
16771677
this.currentGroup = this.rootGroup;
16781678
}

0 commit comments

Comments
 (0)