@@ -47,26 +47,6 @@ export class IgxGridToolbarAdvancedFilteringComponent implements AfterViewInit {
4747 this . grid ?. advancedFilteringExpressionsTreeChange . subscribe ( filteringTree => {
4848 this . numberOfColumns = this . extractUniqueFieldNamesFromFilterTree ( filteringTree ) . length ;
4949 } ) ;
50- this . grid ?. filteringExpressionsTreeChange . subscribe ( ( ) => {
51- if ( this . grid . advancedFilteringExpressionsTree ) {
52- const dataKeys = Object . keys ( this . grid . data [ 0 ] ) ;
53- const filteringOperands = this . grid . advancedFilteringExpressionsTree . filteringOperands ;
54-
55- const allOperandsPresent = filteringOperands . every ( operand => {
56- if ( operand instanceof FilteringExpressionsTree ) {
57- // Recursively check nested filtering trees
58- return this . checkFilteringOperands ( operand , dataKeys ) ;
59- } else {
60- return dataKeys . includes ( operand . fieldName ) ;
61- }
62- } ) ;
63-
64- if ( ! allOperandsPresent ) {
65- this . grid . advancedFilteringExpressionsTree = this . grid . filteringExpressionsTree ;
66- this . numberOfColumns = 0 ;
67- }
68- }
69- } ) ;
7050 }
7151
7252 /**
@@ -88,15 +68,4 @@ export class IgxGridToolbarAdvancedFilteringComponent implements AfterViewInit {
8868 } ) ;
8969 return [ ...new Set ( columnNames ) ] ;
9070 }
91-
92- private checkFilteringOperands ( filteringTree : FilteringExpressionsTree , dataKeys : string [ ] ) : boolean {
93- return filteringTree . filteringOperands . every ( operand => {
94- if ( operand instanceof FilteringExpressionsTree ) {
95- // Recursively check nested filtering trees
96- return this . checkFilteringOperands ( operand , dataKeys ) ;
97- } else {
98- return dataKeys . includes ( operand . fieldName ) ;
99- }
100- } ) ;
101- }
10271}
0 commit comments