Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove toggle from RowType interface, fix FinJsDemo #10540

Merged
merged 3 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<IgxColumnComponent>;
```
- `RowType`, `IgxRowDirective`
- **Breaking Change** - `rowData` and `rowID` deprecated properties are now removed. Use `data` and `key` instead. Use `ng update` for automatic migration.
- `igxRowSelector`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export interface RowType {
delete?: () => any;
pin?: () => void;
unpin?: () => void;
toggle?: () => void;
}

export interface ColumnType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export class IgxExcelStyleMovingComponent {
return columns[index];
}
}
return columns[0];
} else {
while (index < columns.length - 1) {
index++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 2 additions & 4 deletions src/app/shared/financialData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 Array.from(data);
}

/*** Genrates additional financial data fields */
Expand Down