Skip to content

Commit

Permalink
Merge branch 'master' into sstoyanov/bug-fix-2951
Browse files Browse the repository at this point in the history
  • Loading branch information
bkulov authored Nov 9, 2018
2 parents 8b6724a + 1d6563c commit a01a34f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
<input #input
igxInput
tabindex="0"
(click)="openDialog()"
[placeholder]="placeholder"
autocomplete="off"
(click)="openDatePicker(openDialog)"
[placeholder]="placeholder"
autocomplete="off"
[value]="displayData | date"
[readonly]="true"
(keydown)="onInputKeyDown($event)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,15 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
this.transform(this.chipAreaScrollOffset);
}

/*
* Opens date-picker if condition is not unary
*/
public openDatePicker(openDialog: Function) {
if (!this.expression.condition.isUnary) {
openDialog();
}
}

/**
* Opens the conditions dropdown.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,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 a01a34f

Please sign in to comment.