From eca369023c09929e61c8a92ac96efd33ef4e425e Mon Sep 17 00:00:00 2001 From: IBarakov Date: Thu, 23 Apr 2020 11:06:45 +0300 Subject: [PATCH] fix(filtering): filter behavior on number type filter #6973 --- .../grids/filtering/base/grid-filtering-row.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts index 9bd23b5dd7f..5ecd61f7533 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts @@ -24,7 +24,7 @@ import { IBaseChipEventArgs, IgxChipsAreaComponent, IgxChipComponent } from '../ import { ExpressionUI } from '../grid-filtering.service'; import { IgxDropDownItemComponent } from '../../../drop-down/drop-down-item.component'; import { IgxFilteringService } from '../grid-filtering.service'; -import { KEYS, isEdge } from '../../../core/utils'; +import { KEYS, isEdge, isIE } from '../../../core/utils'; import { AbsoluteScrollStrategy } from '../../../services/overlay/scroll'; /** @@ -281,8 +281,10 @@ export class IgxGridFilteringRowComponent implements AfterViewInit { public onInput(eventArgs) { // The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason, // when you have a japanese character as a placeholder, on init the value here is empty string . - if (isEdge() || this.isKeyPressed || eventArgs.target.value) { - this.value = eventArgs.target.value; + const target = eventArgs.target; + + if (isEdge() && target.type !== 'number' || this.isKeyPressed && isIE() || target.value || target.checkValidity()) { + this.value = target.value; } }