From 698106d4a581a69e4deb858137d96bdde4be38bd Mon Sep 17 00:00:00 2001 From: Hristo Anastasov Date: Thu, 18 Nov 2021 09:59:01 +0200 Subject: [PATCH 1/3] fix(grid): remove toggle from RowType interface --- .../igniteui-angular/src/lib/grids/common/grid.interface.ts | 1 - .../filtering/excel-style/excel-style-moving.component.ts | 1 + .../src/lib/grids/grid-navigation.service.ts | 6 ++++-- src/app/shared/financialData.ts | 6 ++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/common/grid.interface.ts b/projects/igniteui-angular/src/lib/grids/common/grid.interface.ts index f498cffd064..ebac4ad9c1f 100644 --- a/projects/igniteui-angular/src/lib/grids/common/grid.interface.ts +++ b/projects/igniteui-angular/src/lib/grids/common/grid.interface.ts @@ -105,7 +105,6 @@ export interface RowType { delete?: () => any; pin?: () => void; unpin?: () => void; - toggle?: () => void; } export interface ColumnType { diff --git a/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-moving.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-moving.component.ts index 95718c0f303..bd0b60f4ea5 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-moving.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-moving.component.ts @@ -80,6 +80,7 @@ export class IgxExcelStyleMovingComponent { return columns[index]; } } + return columns[0]; } else { while (index < columns.length - 1) { index++; diff --git a/projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts b/projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts index f2ca629ba0e..0a7f4b306f7 100644 --- a/projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts +++ b/projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts @@ -520,13 +520,15 @@ export class IgxGridNavigationService { } } else if (!row.expanded && ROW_EXPAND_KEYS.has(key)) { if (row.key === undefined) { - row.toggle(); + // TODO use expanded row.expanded = !row.expanded; + (row as any).toggle(); } else { this.grid.gridAPI.set_row_expansion_state(row.key, true, event); } } else if (row.expanded && ROW_COLLAPSE_KEYS.has(key)) { if (row.key === undefined) { - row.toggle(); + // TODO use expanded row.expanded = !row.expanded; + (row as any).toggle(); } else { this.grid.gridAPI.set_row_expansion_state(row.key, false, event); } diff --git a/src/app/shared/financialData.ts b/src/app/shared/financialData.ts index a17a11a03c3..da8be8f86e2 100644 --- a/src/app/shared/financialData.ts +++ b/src/app/shared/financialData.ts @@ -895,12 +895,10 @@ export class FinancialData { /** Updates values in random records */ public static updateRandomPrices(data: any[]): any[] { - const newData = data.slice(); - // fixing a strange bug where newData has more elements than data, but all of those "explicit" items are undefined for (let i = Math.round(Math.random() * 10); i < data.length; i += Math.round(Math.random() * 10)) { - newData.push(this.randomizeObjectData(newData[i])); + this.randomizeObjectData(data[i]); } - return newData; + return return Array.from(data); } /*** Genrates additional financial data fields */ From c49e553b0e7e976856b80b9d8488bd0aec9aed1a Mon Sep 17 00:00:00 2001 From: Hristo Anastasov Date: Thu, 18 Nov 2021 10:04:32 +0200 Subject: [PATCH 2/3] chore(*): dont do return return --- src/app/shared/financialData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/financialData.ts b/src/app/shared/financialData.ts index da8be8f86e2..47269f01f39 100644 --- a/src/app/shared/financialData.ts +++ b/src/app/shared/financialData.ts @@ -898,7 +898,7 @@ export class FinancialData { for (let i = Math.round(Math.random() * 10); i < data.length; i += Math.round(Math.random() * 10)) { this.randomizeObjectData(data[i]); } - return return Array.from(data); + return Array.from(data); } /*** Genrates additional financial data fields */ From 3b22f0236edacff61ece8d9e0c848af393aab52e Mon Sep 17 00:00:00 2001 From: Hristo Anastasov Date: Thu, 18 Nov 2021 10:08:38 +0200 Subject: [PATCH 3/3] chore(*): update CHANGELOG --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c30fad57e62..085f2bba3c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,7 +80,11 @@ All notable changes for each version of this project will be documented in this Use `IgxGridToolbarComponent`, `IgxGridToolbarHidingComponent`, `IgxGridToolbarPinningComponent` instead. - **Breaking Change** - The `rowSelected` event is renamed to `rowSelectionChanging` to better reflect its function. - **Breaking Change** - The `columnSelected` event is renamed to `columnSelectionChanging` to better reflect its function. - - **Breaking Change** - `columnsCollection` is removed. Use `columns` instead. + - **Breaking Change** - `columnsCollection` is removed. Use `columns` instead. If at certain ocasions `columns` return empty array, query the columns using `ViewChildren` and access those in `ngAfterViewInit`: + ```ts + @ViewChildren(IgxColumnComponent, { read: IgxColumnComponent }) + public columns: QueryList; + ``` - `RowType`, `IgxRowDirective` - **Breaking Change** - `rowData` and `rowID` deprecated properties are now removed. Use `data` and `key` instead. Use `ng update` for automatic migration. - `igxRowSelector`