igniteui-angular 13.1.1 → 13.1.2
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.
|
@@ -55976,9 +55976,6 @@ class IgxFilteringService {
|
|
|
55976
55976
|
grid.paginator.page = 0;
|
|
55977
55977
|
}
|
|
55978
55978
|
const fieldFilterIndex = filteringTree.findIndex(fieldName);
|
|
55979
|
-
if (fieldFilterIndex > -1) {
|
|
55980
|
-
filteringTree.filteringOperands.splice(fieldFilterIndex, 1);
|
|
55981
|
-
}
|
|
55982
55979
|
this.prepare_filtering_expression(filteringTree, fieldName, term, conditionOrExpressionsTree, ignoreCase, fieldFilterIndex);
|
|
55983
55980
|
grid.filteringExpressionsTree = filteringTree;
|
|
55984
55981
|
}
|
|
@@ -55987,14 +55984,20 @@ class IgxFilteringService {
|
|
|
55987
55984
|
* but a new object is created and returned.
|
|
55988
55985
|
*/
|
|
55989
55986
|
prepare_filtering_expression(filteringState, fieldName, searchVal, conditionOrExpressionsTree, ignoreCase, insertAtIndex = -1, createNewTree = false) {
|
|
55990
|
-
|
|
55987
|
+
let expressionsTree = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
|
|
55991
55988
|
conditionOrExpressionsTree : null;
|
|
55992
55989
|
const condition = conditionOrExpressionsTree instanceof FilteringExpressionsTree ?
|
|
55993
55990
|
null : conditionOrExpressionsTree;
|
|
55994
|
-
|
|
55995
|
-
|
|
55996
|
-
new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName)
|
|
55997
|
-
|
|
55991
|
+
let newExpressionsTree = filteringState;
|
|
55992
|
+
if (createNewTree) {
|
|
55993
|
+
newExpressionsTree = new FilteringExpressionsTree(filteringState.operator, filteringState.fieldName);
|
|
55994
|
+
newExpressionsTree.filteringOperands = [...filteringState.filteringOperands];
|
|
55995
|
+
}
|
|
55996
|
+
if (condition) {
|
|
55997
|
+
const newExpression = { fieldName, searchVal, condition, ignoreCase };
|
|
55998
|
+
expressionsTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
|
|
55999
|
+
expressionsTree.filteringOperands.push(newExpression);
|
|
56000
|
+
}
|
|
55998
56001
|
if (expressionsTree) {
|
|
55999
56002
|
if (insertAtIndex > -1) {
|
|
56000
56003
|
newExpressionsTree.filteringOperands[insertAtIndex] = expressionsTree;
|
|
@@ -56003,12 +56006,6 @@ class IgxFilteringService {
|
|
|
56003
56006
|
newExpressionsTree.filteringOperands.push(expressionsTree);
|
|
56004
56007
|
}
|
|
56005
56008
|
}
|
|
56006
|
-
else if (condition) {
|
|
56007
|
-
// create expressions tree for this field and add the new expression to it
|
|
56008
|
-
const newExprTree = new FilteringExpressionsTree(filteringState.operator, fieldName);
|
|
56009
|
-
newExprTree.filteringOperands.push(newExpression);
|
|
56010
|
-
newExpressionsTree.filteringOperands.push(newExprTree);
|
|
56011
|
-
}
|
|
56012
56009
|
return newExpressionsTree;
|
|
56013
56010
|
}
|
|
56014
56011
|
isFilteringTreeComplex(expressions) {
|