Skip to content

Commit 8240572

Browse files
authored
Merge branch 'master' into thristodorova/query-builder-fix-return-fields
2 parents c14b3eb + 2023999 commit 8240572

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master, 19.0.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
16+
branches: [ master, 19.1.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master, 19.0.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
19+
branches: [ master, 19.1.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
2020
schedule:
2121
- cron: '33 4 * * 4'
2222

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
| Version | Supported |
66
| -------- | ------------------ |
7-
| 19.0.x | :white_check_mark: |
7+
| 19.1.x | :white_check_mark: |
8+
| 19.0.x | :x: |
89
| 18.2.x | :white_check_mark: |
910
| 18.1.x | :x: |
1011
| 18.0.x | :x: |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
549549
const lowerCaseFilterValues = new Set(Array.from(expr.expression.searchVal).map((value: string) => value.toLowerCase()));
550550

551551
this.grid.data.forEach(item => {
552-
if (lowerCaseFilterValues.has(item[this.column.field]?.toLowerCase())) {
552+
if (typeof item[this.column.field] === "string" && lowerCaseFilterValues.has(item[this.column.field]?.toLowerCase())) {
553553
expr.expression.searchVal.add(item[this.column.field]);
554554
}
555555
});

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-filtering.spec.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { GridFunctions } from '../../test-utils/grid-functions.spec';
1313
import { UIInteractions } from '../../test-utils/ui-interactions.spec';
1414
import { SampleTestData } from '../../test-utils/sample-test-data.spec';
1515
import { By } from '@angular/platform-browser';
16+
import { GridColumnDataType } from '../../data-operations/data-util';
1617

1718
const IGX_CHECKBOX_LABEL = '.igx-checkbox__label';
1819

@@ -751,6 +752,29 @@ describe('IgxTreeGrid - Filtering actions #tGrid', () => {
751752
emptyTextEl = searchComponent.querySelector('.igx-excel-filter__empty');
752753
expect(emptyTextEl.innerText).toEqual('No matches');
753754
}));
755+
756+
it('Should not throw console error when number column with dataType string is filtered.', fakeAsync(() => {
757+
tGrid.columns[0].dataType = GridColumnDataType.String;
758+
fix.detectChanges();
759+
spyOn(console, 'error');
760+
761+
GridFunctions.clickExcelFilterIcon(fix, 'ID');
762+
fix.detectChanges();
763+
tick();
764+
765+
const excelMenu = GridFunctions.getExcelStyleFilteringComponent(fix, 'igx-tree-grid');
766+
const checkboxes: any[] = Array.from(GridFunctions.getExcelStyleFilteringCheckboxes(fix, excelMenu, 'igx-tree-grid'));
767+
768+
checkboxes[2].click();
769+
tick();
770+
fix.detectChanges();
771+
772+
GridFunctions.clickApplyExcelStyleFiltering(fix, null, 'igx-tree-grid');
773+
fix.detectChanges();
774+
tick();
775+
776+
expect(console.error).not.toHaveBeenCalled();
777+
}));
754778
});
755779

756780
describe('Tree grid ESF templates', () => {

0 commit comments

Comments
 (0)