Skip to content

Commit 996bead

Browse files
authored
Merge branch '10.2.x' into mkirova/fix-8407
2 parents f182a7f + 68d88e0 commit 996bead

File tree

10 files changed

+44
-18
lines changed

10 files changed

+44
-18
lines changed

projects/igniteui-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"web-animations-js": "^2.3.2"
8585
},
8686
"igxDevDependencies": {
87-
"@igniteui/angular-schematics": "~10.2.620-beta.0"
87+
"@igniteui/angular-schematics": "~10.2.620"
8888
},
8989
"ng-update": {
9090
"migrations": "./migrations/migration-collection.json"

projects/igniteui-angular/src/lib/core/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export const NAVIGATION_KEYS = new Set([
328328
]);
329329
export const ROW_EXPAND_KEYS = new Set('right down arrowright arrowdown'.split(' '));
330330
export const ROW_COLLAPSE_KEYS = new Set('left up arrowleft arrowup'.split(' '));
331-
export const SUPPORTED_KEYS = new Set([...Array.from(NAVIGATION_KEYS), 'enter', 'f2', 'escape', 'esc', 'pagedown', 'pageup', '+']);
331+
export const SUPPORTED_KEYS = new Set([...Array.from(NAVIGATION_KEYS), 'enter', 'f2', 'escape', 'esc', 'pagedown', 'pageup', '+', 'add']);
332332
export const HEADER_KEYS = new Set([...Array.from(NAVIGATION_KEYS), 'escape', 'esc' , 'l']);
333333

334334
/**

projects/igniteui-angular/src/lib/grids/column-actions/column-actions-base.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export abstract class IgxColumnActionsBaseDirective {
1616
/**
1717
* @hidden @internal
1818
*/
19-
public checkAllLabel: string;
19+
public abstract get checkAllLabel(): string;
2020

2121
/**
2222
* @hidden @internal
2323
*/
24-
public uncheckAllLabel: string;
24+
public abstract get uncheckAllLabel(): string;
2525

2626
/**
2727
* @hidden @internal

projects/igniteui-angular/src/lib/grids/column-actions/column-hiding.directive.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ export class IgxColumnHidingDirective extends IgxColumnActionsBaseDirective {
1818
/**
1919
* @hidden @internal
2020
*/
21-
public checkAllLabel = this.columnActions.grid?.resourceStrings.igx_grid_hiding_check_all_label ?? 'Hide All';
21+
public get checkAllLabel(): string {
22+
return this.columnActions.grid?.resourceStrings.igx_grid_hiding_check_all_label ?? 'Hide All';
23+
}
2224

2325
/**
2426
* @hidden @internal
2527
*/
26-
public uncheckAllLabel = this.columnActions.grid?.resourceStrings.igx_grid_hiding_uncheck_all_label ?? 'Show All';
27-
28+
public get uncheckAllLabel(): string {
29+
return this.columnActions.grid?.resourceStrings.igx_grid_hiding_uncheck_all_label ?? 'Show All';
30+
}
2831
/**
2932
* @hidden @internal
3033
*/

projects/igniteui-angular/src/lib/grids/column-actions/column-pinning.directive.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ export class IgxColumnPinningDirective extends IgxColumnActionsBaseDirective {
1818
/**
1919
* @hidden @internal
2020
*/
21-
public checkAllLabel = this.columnActions.grid?.resourceStrings.igx_grid_pinning_check_all_label ?? 'Pin All';
21+
public get checkAllLabel(): string {
22+
return this.columnActions.grid?.resourceStrings.igx_grid_pinning_check_all_label ?? 'Pin All';
23+
}
2224

2325
/**
2426
* @hidden @internal
2527
*/
26-
public uncheckAllLabel = this.columnActions.grid?.resourceStrings.igx_grid_pinning_uncheck_all_label ?? 'Unpin All';
27-
28+
public get uncheckAllLabel(): string {
29+
return this.columnActions.grid?.resourceStrings.igx_grid_pinning_uncheck_all_label ?? 'Unpin All';
30+
}
2831
/**
2932
* @hidden @internal
3033
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ export class IgxGridExcelStyleFilteringComponent implements OnDestroy {
501501

502502
private generateUniqueValues(columnValues: any[]) {
503503
if (this.column.dataType === DataType.String && this.column.filteringIgnoreCase) {
504-
const filteredUniqueValues = columnValues.map(s => s?.toLowerCase())
504+
const filteredUniqueValues = columnValues.map(s => s?.toString().toLowerCase())
505505
.reduce((map, val, i) => map.get(val) ? map : map.set(val, columnValues[i]),
506506
new Map);
507507

projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export class IgxGridNavigationService {
5151
!this.grid.crudService.rowEditingBlocked && !this.grid.rowInEditMode) { return; }
5252
const shift = event.shiftKey;
5353
const ctrl = event.ctrlKey;
54-
const alt = event.altKey;
5554
if (NAVIGATION_KEYS.has(key) && this.pendingNavigation) { event.preventDefault(); return; }
5655

5756
const type = this.isDataRow(this.activeNode.row) ? 'dataCell' :
@@ -224,7 +223,7 @@ export class IgxGridNavigationService {
224223
}
225224

226225
focusFirstCell(header = true) {
227-
if (this.grid.dataView.length && this.activeNode &&
226+
if ((header || this.grid.dataView.length) && this.activeNode &&
228227
(this.activeNode.row === -1 || this.activeNode.row === this.grid.dataView.length ||
229228
(!header && !this.grid.hasSummarizedColumns))) { return; }
230229

@@ -631,6 +630,6 @@ export class IgxGridNavigationService {
631630
}
632631

633632
private isAddKey(key: string): boolean {
634-
return key === '+';
633+
return key === '+' || key === 'add'; // add is for IE and Edge
635634
}
636635
}

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-add-row-ui.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,22 @@ describe('IgxTreeGrid - Add Row UI #tGrid', () => {
110110
// should have same parent record.
111111
expect(addedRow.treeRow.parent).toBe(row.treeRow.parent);
112112
});
113+
114+
it('should allow adding row to empty grid', () => {
115+
treeGrid.data = [];
116+
fix.detectChanges();
117+
118+
expect(treeGrid.rowList.length).toBe(0);
119+
120+
// begin add row for empty grid
121+
treeGrid.beginAddRowByIndex(null, -1);
122+
fix.detectChanges();
123+
endTransition();
124+
125+
treeGrid.endEdit(true);
126+
fix.detectChanges();
127+
128+
expect(treeGrid.rowList.length).toBe(1);
129+
});
113130
});
114131
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ export class IgxTreeGridComponent extends IgxGridBaseDirective implements GridTy
526526
protected _getParentRecordId() {
527527
if (this.addRowParent.asChild) {
528528
return super._getParentRecordId();
529-
} else {
529+
} else if (this.addRowParent.rowID !== null && this.addRowParent.rowID !== undefined) {
530530
const spawnedForRecord = this._gridAPI.get_rec_by_id(this.addRowParent.rowID);
531-
return spawnedForRecord.parent?.rowID;
531+
return spawnedForRecord?.parent?.rowID;
532532
}
533533
}
534534

src/app/grid-column-actions/custom-action-directive.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ export class IgxColumnGroupingDirective extends IgxColumnActionsBaseDirective {
1818
/**
1919
* @hidden @internal
2020
*/
21-
public checkAllLabel = 'Group By All';
21+
public get checkAllLabel(): string {
22+
return 'Group By All';
23+
}
2224

2325
/**
2426
* @hidden @internal
2527
*/
26-
public uncheckAllLabel = 'Ungroup All';
28+
public get uncheckAllLabel(): string {
29+
return 'Ungroup All';
30+
}
2731

2832
/**
2933
* @hidden @internal

0 commit comments

Comments
 (0)