Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ export class OrdersTreeDataItem {
Object.assign(this, init);
}

public ID: number;
public ParentID: number;
public Name: string;
public Category: string;
public OrderDate: string;
public Units: number;
public UnitPrice: number;
public Price: number;
public Delivered: boolean;
public ID!: number;
public ParentID!: number;
public Name!: string;
public Category!: string;
public OrderDate!: string;
public Units!: number;
public UnitPrice!: number;
public Price!: number;
public Delivered!: boolean;

}
export class OrdersTreeData extends Array<OrdersTreeDataItem> {
Expand Down
12 changes: 10 additions & 2 deletions samples/grids/tree-grid/data-exporting-indicator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ export class Sample {

constructor() {
const localData: any[] = [];
let idOffset = 0;
for (let i = 0; i < 10000; i += 3) {
for (let c = 0; c < this.ordersTreeData.length; c++) {
localData.push(this.ordersTreeData[c]);
const item = this.ordersTreeData[c];
const newItem = {
...item,
ID: item.ID + idOffset,
ParentID: item.ParentID === -1 ? -1 : item.ParentID + idOffset
};
localData.push(newItem);
}
idOffset += 10000;
}

var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent;
Expand All @@ -30,7 +38,7 @@ export class Sample {
});
}

private _ordersTreeData: OrdersTreeData = null;
private _ordersTreeData: OrdersTreeData | null = null;
public get ordersTreeData(): OrdersTreeData {
if (this._ordersTreeData == null)
{
Expand Down