Skip to content

Commit

Permalink
fix(igx-grid): Clear filter when value is cleared from input, #2945
Browse files Browse the repository at this point in the history
  • Loading branch information
sstoyanovIG committed Nov 7, 2018
1 parent eb90bb1 commit 41c5b0d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ export class IgxFilteringService implements OnDestroy {
for (let i = 0; i < expressionsList.length; i++) {
currExpressionUI = expressionsList[i];

if (!currExpressionUI.expression.condition.isUnary && currExpressionUI.expression.searchVal === null) {
if (currExpressionUI.afterOperator === FilteringLogic.And && !currAndBranch) {
currAndBranch = new FilteringExpressionsTree(FilteringLogic.And, columnId);
expressionsTree.filteringOperands.push(currAndBranch);
}
continue;
}

if ((currExpressionUI.beforeOperator === undefined || currExpressionUI.beforeOperator === null ||
currExpressionUI.beforeOperator === FilteringLogic.Or) &&
currExpressionUI.afterOperator === FilteringLogic.And) {
Expand Down

0 comments on commit 41c5b0d

Please sign in to comment.