igniteui-angular 12.3.13 → 12.3.14

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.
@@ -44655,9 +44655,6 @@
44655
44655
  grid.paginator.page = 0;
44656
44656
  }
44657
44657
  var fieldFilterIndex = filteringTree.findIndex(fieldName);
44658
- if (fieldFilterIndex > -1) {
44659
- filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
44660
- }
44661
44658
  this.prepare_filtering_expression(filteringTree, fieldName, term, conditionOrExpressionsTree, ignoreCase, fieldFilterIndex);
44662
44659
  grid.filteringExpressionsTree = filteringTree;
44663
44660
  };
@@ -44672,10 +44669,16 @@
44672
44669
  conditionOrExpressionsTree : null;
44673
44670
  var condition = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
44674
44671
  null : conditionOrExpressionsTree;
44675
- var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
44676
- var newExpressionsTree = createNewTree ?
44677
- new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName) : filteringState;
44678
- // no expressions tree found for this field
44672
+ var newExpressionsTree = filteringState;
44673
+ if (createNewTree) {
44674
+ newExpressionsTree = new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName);
44675
+ newExpressionsTree.filteringOperands = __spreadArray([], __read(filteringState.filteringOperands));
44676
+ }
44677
+ if (condition) {
44678
+ var newExpression = { fieldName: fieldName, searchVal: searchVal, condition: condition, ignoreCase: ignoreCase };
44679
+ expressionsTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
44680
+ expressionsTree.filteringOperands.push(newExpression);
44681
+ }
44679
44682
  if (expressionsTree) {
44680
44683
  if (insertAtIndex > -1) {
44681
44684
  newExpressionsTree.filteringOperands[insertAtIndex] = expressionsTree;
@@ -44684,12 +44687,6 @@
44684
44687
  newExpressionsTree.filteringOperands.push(expressionsTree);
44685
44688
  }
44686
44689
  }
44687
- else if (condition) {
44688
- // create expressions tree for this field and add the new expression to it
44689
- var newExprTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
44690
- newExprTree.filteringOperands.push(newExpression);
44691
- newExpressionsTree.filteringOperands.push(newExprTree);
44692
- }
44693
44690
  return newExpressionsTree;
44694
44691
  };
44695
44692
  IgxFilteringService.prototype.isFilteringTreeComplex = function (expressions) {