Skip to content

Commit 0c8ccd4

Browse files
committed
Merge branch 'dmdimitrov/query-builder-improvements' into mcherkasov/qb-rehydration
2 parents e148eb5 + a974892 commit 0c8ccd4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,9 @@ <h6 class="igx-filter-empty__title">
459459
</div>
460460
</div>
461461

462-
<ng-container *ngIf="(!expressionItem.inEditMode && expressionItem.expression.searchTree) || (expressionItem.inEditMode && selectedField?.filters?.condition(selectedCondition)?.isNestedQuery)">
462+
<ng-container *ngIf="
463+
(!expressionItem.inEditMode && expressionItem.expression.searchTree && expressionItem.expression.searchTree.filteringOperands?.length > 0) ||
464+
(expressionItem.inEditMode && selectedField?.filters?.condition(selectedCondition)?.isNestedQuery)">
463465
<igx-query-builder-tree
464466
[style.display]="expressionItem.inEditMode || expressionItem.expanded ? 'block' : 'none'"
465467
[entities]="entities"

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
@@ -1656,15 +1656,15 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
16561656
}
16571657
}
16581658

1659-
16601659
private init() {
16611660
this.clearSelection();
16621661
this.cancelOperandAdd();
16631662
this.cancelOperandEdit();
16641663

1665-
// Ignore values of 'parent' and 'hovered' properties for the comparison
1664+
// Ignore values of certain properties for the comparison
1665+
const propsToIgnore = ['parent', 'hovered', 'ignoreCase', 'inEditMode', 'inAddMode'];
16661666
const propsReplacer = function replacer(key, value) {
1667-
if (key === "parent" || key === "hovered" || key === "ignoreCase" || key === "inEditMode") {
1667+
if (propsToIgnore.indexOf(key) >= 0) {
16681668
return undefined;
16691669
} else {
16701670
return value;

0 commit comments

Comments
 (0)