Skip to content

Commit 06346b6

Browse files
Merge branch '10.2.x' into ibarakov/fix-8334-master
2 parents 2528b47 + 3b25190 commit 06346b6

File tree

9 files changed

+42
-15
lines changed

9 files changed

+42
-15
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/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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export class IgxGridNavigationService {
224224
}
225225

226226
focusFirstCell(header = true) {
227-
if (this.grid.dataView.length && this.activeNode &&
227+
if ((header || this.grid.dataView.length) && this.activeNode &&
228228
(this.activeNode.row === -1 || this.activeNode.row === this.grid.dataView.length ||
229229
(!header && !this.grid.hasSummarizedColumns))) { return; }
230230

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)