Skip to content

Commit 1c3a913

Browse files
committed
fix(query-builder): bug where new conditions don't have parent
1 parent 00b67ff commit 1c3a913

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
802802
this._lastFocusedChipIndex++;
803803
} else {
804804
this.rootGroup = groupItem;
805+
operandItem.parent = groupItem;
805806
this.rootGroup.children.push(operandItem);
806807
this._lastFocusedChipIndex = 0;
807808
}

src/app/query-builder/query-builder.sample.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ export class QueryBuilderComponent implements OnInit {
253253
conditionName: IgxStringFilteringOperand.instance().condition('notNull').name
254254
});
255255
tree.filteringOperands.push(subGroup2);
256+
257+
this.expressionTree = tree;
256258
}
257259
this.lData = [{ id: 0, field: 'a' }, { id: 1, field: '1' }]
258260
// this.onChange();

0 commit comments

Comments
 (0)