igniteui-angular 11.1.41 → 11.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38625,9 +38625,6 @@
38625
38625
  grid.page = 0;
38626
38626
  }
38627
38627
  var fieldFilterIndex = filteringTree.findIndex(fieldName);
38628
- if (fieldFilterIndex > -1) {
38629
- filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
38630
- }
38631
38628
  this.prepare_filtering_expression(filteringTree, fieldName, term, conditionOrExpressionsTree, ignoreCase, fieldFilterIndex);
38632
38629
  grid.filteringExpressionsTree = filteringTree;
38633
38630
  };
@@ -38642,10 +38639,16 @@
38642
38639
  conditionOrExpressionsTree : null;
38643
38640
  var condition = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
38644
38641
  null : conditionOrExpressionsTree;
38645
- var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
38646
- var newExpressionsTree = createNewTree ?
38647
- new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName) : filteringState;
38648
- // no expressions tree found for this field
38642
+ var newExpressionsTree = filteringState;
38643
+ if (createNewTree) {
38644
+ newExpressionsTree = new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName);
38645
+ newExpressionsTree.filteringOperands = __spread(filteringState.filteringOperands);
38646
+ }
38647
+ if (condition) {
38648
+ var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
38649
+ expressionsTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
38650
+ expressionsTree.filteringOperands.push(newExpression);
38651
+ }
38649
38652
  if (expressionsTree) {
38650
38653
  if (insertAtIndex > -1) {
38651
38654
  newExpressionsTree.filteringOperands[insertAtIndex] = expressionsTree;
@@ -38654,12 +38657,6 @@
38654
38657
  newExpressionsTree.filteringOperands.push(expressionsTree);
38655
38658
  }
38656
38659
  }
38657
- else if (condition) {
38658
- // create expressions tree for this field and add the new expression to it
38659
- var newExprTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
38660
- newExprTree.filteringOperands.push(newExpression);
38661
- newExpressionsTree.filteringOperands.push(newExprTree);
38662
- }
38663
38660
  return newExpressionsTree;
38664
38661
  };
38665
38662
  IgxFilteringService.prototype.isFilteringTreeComplex = function (expressions) {