Skip to content

Commit 2cdd959

Browse files
igdmdimitrovgedinakovahanastasov
authored
fix(live-editing): fixed data import (#2776)
Co-authored-by: Galina Edinakova <gedinakova@infragistics.com> Co-authored-by: Hristo <hristo.anastasov@gmail.com>
1 parent 8134bbd commit 2cdd959

3 files changed

Lines changed: 127 additions & 2 deletions

File tree

live-editing/configs/TreeGridConfigGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ export class TreeGridConfigGenerator implements IConfigGenerator {
712712

713713
// Tree Grid Keyboard Navigation Sample
714714
configs.push(new Config({
715-
additionalFiles: ['/src/app/directives/prevent-scroll.directive.ts', '/projects/app-lob/src/app/tree-grid/tree-grid-childdatakey-sample/data.ts'],
715+
additionalFiles: ['/src/app/directives/prevent-scroll.directive.ts', '/src/app/tree-grid/tree-grid-keyboard-navigation/data.ts'],
716716
appModuleConfig: new AppModuleConfig({
717717
imports: ['IgxPreventDocumentScrollModule', 'IgxTreeGridModule', 'TreeGridKBNavigationComponent'],
718718
ngDeclarations: ['TreeGridKBNavigationComponent'],
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/* eslint-disable @typescript-eslint/naming-convention */
2+
export const EMPLOYEE_DATA = [
3+
{
4+
Age: 55,
5+
Employees: [
6+
{
7+
Age: 43,
8+
Employees: [],
9+
HireDate: new Date(2011, 6, 3),
10+
ID: 3,
11+
Name: 'Michael Burke'
12+
},
13+
{
14+
Age: 29,
15+
Employees: undefined,
16+
HireDate: new Date(2009, 6, 19),
17+
ID: 2,
18+
Name: 'Thomas Anderson'
19+
},
20+
{
21+
Age: 31,
22+
Employees: [
23+
{
24+
Age: 35,
25+
HireDate: new Date(2015, 9, 17),
26+
ID: 6,
27+
Name: 'Roland Mendel'
28+
},
29+
{
30+
Age: 44,
31+
HireDate: new Date(2009, 10, 11),
32+
ID: 12,
33+
Name: 'Sven Cooper'
34+
}
35+
],
36+
HireDate: new Date(2014, 8, 18),
37+
ID: 11,
38+
Name: 'Monica Reyes'
39+
}],
40+
HireDate: new Date(2008, 3, 20),
41+
ID: 1,
42+
Name: 'Johnathan Winchester'
43+
},
44+
{
45+
Age: 42,
46+
Employees: [
47+
{
48+
Age: 44,
49+
HireDate: new Date(2014, 4, 4),
50+
ID: 14,
51+
Name: 'Laurence Johnson'
52+
},
53+
{
54+
Age: 25,
55+
Employees: [
56+
{
57+
Age: 39,
58+
HireDate: new Date(2010, 3, 22),
59+
ID: 13,
60+
Name: 'Trevor Ashworth'
61+
}
62+
],
63+
HireDate: new Date(2017, 11, 9),
64+
ID: 5,
65+
Name: 'Elizabeth Richards'
66+
}],
67+
HireDate: new Date(2014, 1, 22),
68+
ID: 4,
69+
Name: 'Ana Sanders'
70+
},
71+
{
72+
Age: 49,
73+
Employees: [
74+
{
75+
Age: 44,
76+
Employees: [],
77+
HireDate: new Date(2014, 4, 4),
78+
ID: 17,
79+
Name: 'Antonio Moreno'
80+
}],
81+
HireDate: new Date(2014, 1, 22),
82+
ID: 18,
83+
Name: 'Victoria Lincoln'
84+
},
85+
{
86+
Age: 61,
87+
Employees: [
88+
{
89+
Age: 50,
90+
Employees: [
91+
{
92+
Age: 25,
93+
Employees: [],
94+
HireDate: new Date(2017, 11, 9),
95+
ID: 15,
96+
Name: 'Patricia Simpson'
97+
},
98+
{
99+
Age: 39,
100+
HireDate: new Date(2010, 3, 22),
101+
ID: 9,
102+
Name: 'Francisco Chang'
103+
},
104+
{
105+
Age: 25,
106+
HireDate: new Date(2018, 3, 18),
107+
ID: 16,
108+
Name: 'Peter Lewis'
109+
}
110+
],
111+
HireDate: new Date(2007, 11, 18),
112+
ID: 7,
113+
Name: 'Pedro Rodriguez'
114+
},
115+
{
116+
Age: 27,
117+
HireDate: new Date(2016, 2, 19),
118+
ID: 8,
119+
Name: 'Casey Harper'
120+
}],
121+
HireDate: new Date(2010, 1, 1),
122+
ID: 10,
123+
Name: 'Yang Wang'
124+
}
125+
];

src/app/tree-grid/tree-grid-keyboard-navigation/tree-grid-keyboard-navigation-sample.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, OnInit, ViewChild } from '@angular/core';
22
import { IGridKeydownEventArgs, CellType, IgxTreeGridComponent } from 'igniteui-angular';
3-
import { EMPLOYEE_DATA } from '../tree-grid-clipboard-operations-sample/data';
3+
import { EMPLOYEE_DATA } from './data';
44

55
@Component({
66
selector: 'app-tree-grid-keyboard-navigation-sample',

0 commit comments

Comments
 (0)