Skip to content

Commit ae3ad37

Browse files
Merge pull request #7188 from IgniteUI/ibarakov/fix-6973-9.1.x
fix(filtering): filter behavior on number type filter #6973
2 parents 079f58d + 00ea3e6 commit ae3ad37

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { IBaseChipEventArgs, IgxChipsAreaComponent, IgxChipComponent } from '../
2424
import { ExpressionUI } from '../grid-filtering.service';
2525
import { IgxDropDownItemComponent } from '../../../drop-down/drop-down-item.component';
2626
import { IgxFilteringService } from '../grid-filtering.service';
27-
import { KEYS, isEdge } from '../../../core/utils';
27+
import { KEYS, isEdge, isIE } from '../../../core/utils';
2828
import { AbsoluteScrollStrategy } from '../../../services/overlay/scroll';
2929

3030
/**
@@ -261,8 +261,10 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
261261
public onInput(eventArgs) {
262262
// The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason,
263263
// when you have a japanese character as a placeholder, on init the value here is empty string .
264-
if (isEdge() || this.isKeyPressed || eventArgs.target.value) {
265-
this.value = eventArgs.target.value;
264+
const target = eventArgs.target;
265+
266+
if (isEdge() && target.type !== 'number' || this.isKeyPressed && isIE() || target.value || target.checkValidity()) {
267+
this.value = target.value;
266268
}
267269
}
268270

0 commit comments

Comments
 (0)