Skip to content

Commit cff09cd

Browse files
authored
Merge branch 'master' into grid-endEdit-facade
2 parents f47ec3b + 5c45802 commit cff09cd

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '33 4 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'javascript' ]
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33+
# Learn more:
34+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v1
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v1

projects/igniteui-angular/src/lib/grids/cell.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@
9090
</igx-input-group>
9191
</ng-container>
9292
<ng-container *ngIf="column.dataType === 'boolean'">
93+
<!-- The additional [checked] binding is needed as after the initial call of the checked getter
94+
it is never called again as no change detection is triggered in the grid after that, resulting in wrong
95+
rendered state of the checkbox. -->
9396
<igx-checkbox
9497
[(ngModel)]="editValue"
98+
[checked]="editValue"
9599
[igxFocus]="true"
96100
[disableRipple]="true"
97101
></igx-checkbox>

projects/igniteui-angular/src/lib/grids/grid/grid-cell-editing.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ describe('IgxGrid - Cell Editing #grid', () => {
164164
const editTemplate = cellDomBoolean.query(By.css('.igx-checkbox'));
165165
expect(editTemplate).toBeDefined();
166166
expect(cell.value).toBe(true);
167+
expect(cell.nativeElement.querySelector('.igx-checkbox--checked')).toBeInstanceOf(HTMLElement);
167168

168169
editTemplate.nativeElement.click();
169170
fixture.detectChanges();
@@ -173,6 +174,7 @@ describe('IgxGrid - Cell Editing #grid', () => {
173174

174175
expect(cell.editMode).toBe(false);
175176
expect(cell.value).toBe(false);
177+
expect(cell.nativeElement.querySelector('.igx-checkbox--checked')).toBeNull();
176178
}));
177179

178180
it('edit template should be according column data type -- date', () => {

projects/igniteui-angular/src/lib/test-utils/configure-suite.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ export const configureTestSuite = () => {
2626
}
2727
};
2828

29+
/** Clear the svg tags from the svgContainer created by the IconService
30+
to avoid increasing their count to over 10000. */
31+
const clearSVGContainer = () => {
32+
document.querySelectorAll('svg').forEach((tag) => tag.remove());
33+
};
34+
2935
afterEach(() => {
36+
clearSVGContainer();
3037
const testBedApi: any = getTestBed();
3138
testBedApi._activeFixtures.forEach((fixture: ComponentFixture<any>) => {
3239
try {

0 commit comments

Comments
 (0)