Skip to content

Commit 22ca93d

Browse files
committed
fix(esf): allow only numeric symbols in numeric column
1 parent a1bcd94 commit 22ca93d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-search.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
tabindex="0"
99
[(ngModel)]="searchValue"
1010
[placeholder]="column.grid.resourceStrings.igx_grid_excel_search_placeholder"
11+
[type]="type"
1112
autocomplete="off"/>
1213
<igx-icon
1314
igxSuffix

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-search.component.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { DisplayDensity } from '../../../core/density';
1515
import { IgxForOfDirective } from '../../../directives/for-of/for_of.directive';
1616
import { FilterListItem } from './grid.excel-style-filtering.component';
1717
import { IgxListComponent } from '../../../list/public_api';
18+
import { DataType } from 'igniteui-angular';
1819

1920
@Directive({
2021
selector: '[igxExcelStyleLoading]'
@@ -86,6 +87,18 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit {
8687

8788
constructor(public cdr: ChangeDetectorRef) { }
8889

90+
/**
91+
* @hidden @internal
92+
*/
93+
public get type(): string {
94+
switch (this.column?.dataType) {
95+
case DataType.Number:
96+
return 'number';
97+
default:
98+
return 'text';
99+
}
100+
}
101+
89102
public ngAfterViewInit() {
90103
this.refreshSize();
91104
}

0 commit comments

Comments
 (0)