Skip to content

Commit 21ad1b0

Browse files
author
Konstantin Dinev
committed
chore(*): updating demos for tests
1 parent 1f31b1f commit 21ad1b0

4 files changed

Lines changed: 53 additions & 26 deletions

File tree

src/app/grid-column-types/grid-column-types.sample.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[filterMode]="filterMode"
1010
rowSelection="multiple"
1111
[rowEditable]="false"
12-
width="700px"
12+
width="800px"
1313
[primaryKey]="'ID'">
1414

1515
<igx-grid-toolbar >
@@ -45,7 +45,7 @@
4545
[filterMode]="filterMode"
4646
rowSelection="multiple"
4747
[rowEditable]="true"
48-
[width]="'700px'">
48+
[width]="'800px'">
4949

5050
<igx-grid-toolbar >
5151
<igx-grid-toolbar-actions>

src/app/hierarchical-grid-remote/hierarchical-grid-remote.sample.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export class HierarchicalGridRemoteSampleComponent implements OnInit, AfterViewI
5555
fields: [
5656
{ field: 'orderId', dataType: 'number' }, // first field will be treated as foreign key
5757
{ field: 'productId', dataType: 'number' },
58-
{ field: 'unitPrice', dataType: 'number' },
58+
{ field: 'unitPrice', dataType: 'currency' },
5959
{ field: 'quantity', dataType: 'number' },
60-
{ field: 'discount', dataType: 'number' }
60+
{ field: 'discount', dataType: 'percent' }
6161
]
6262
}
6363
]
@@ -131,7 +131,7 @@ export class HierarchicalGridRemoteSampleComponent implements OnInit, AfterViewI
131131
console.log('data', data);
132132
event.grid.data = Object.values(data);
133133
event.grid.isLoading = false;
134-
this.cdr.detectChanges();
134+
this.cdr.detectChanges();
135135
});
136136
}
137137

src/app/hierarchical-grid-updating/hierarchical-grid-updating.sample.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
<igx-row-island #rowIsland2 [key]="'Order_Details'" [height]="'300px'" [primaryKey]="'ProductID'"
2424
[autoGenerate]="false" [rowSelection]='selectionMode' (gridCreated)="gridCreated($event, rowIsland2)">
2525
<igx-column field="ProductID"></igx-column>
26-
<igx-column field="UnitPrice"></igx-column>
26+
<igx-column field="UnitPrice" [dataType]='"currency"'></igx-column>
2727
<igx-column field="Quantity"></igx-column>
28-
<igx-column field="Discount"></igx-column>
28+
<igx-column field="Discount" [dataType]='"percent"'></igx-column>
2929
</igx-row-island>
3030
</igx-row-island>
3131
</igx-hierarchical-grid>

src/app/shared/sample-data.ts

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const SAMPLE_DATA = [
1515
DateCreated: undefined,
1616
Contract: null,
1717
Time: new Date(2017, 10, 1, 11, 47, 0),
18+
Discount: 0.05,
1819
},
1920
{
2021
ID: 'ANATR',
@@ -32,6 +33,7 @@ export const SAMPLE_DATA = [
3233
DateCreated: new Date(2015, 10, 1, 11, 37, 22),
3334
Contract: true,
3435
Time: new Date(2017, 10, 1, 12, 17, 1),
36+
Discount: 0.10,
3537
},
3638
{
3739
ID: 'ANTON',
@@ -47,7 +49,8 @@ export const SAMPLE_DATA = [
4749
Fax: null,
4850
Employees: 16,
4951
DateCreated: new Date(2015, 10, 1, 11, 37, 23),
50-
Contract: false
52+
Contract: false,
53+
Discount: 0.15,
5154
},
5255
{
5356
ID: 'AROUT',
@@ -65,6 +68,7 @@ export const SAMPLE_DATA = [
6568
DateCreated: new Date(2010, 2, 15, 15, 51, 22),
6669
Contract: false,
6770
Time: new Date(2017, 11, 11, 11, 11, 1),
71+
Discount: 0.20,
6872
},
6973
{
7074
ID: 'BERGS',
@@ -82,6 +86,7 @@ export const SAMPLE_DATA = [
8286
DateCreated: new Date(2015, 2, 5, 5, 3, 22),
8387
Contract: true,
8488
Time: new Date(2018, 9, 14, 14, 4, 3),
89+
Discount: 0.25,
8590
},
8691
{
8792
ID: 'BLAUS',
@@ -99,6 +104,7 @@ export const SAMPLE_DATA = [
99104
DateCreated: new Date(2016, 7, 1, 19, 22, 22),
100105
Contract: true,
101106
Time: new Date(2018, 6, 7, 7, 6, 5),
107+
Discount: 0.30,
102108
},
103109
{
104110
ID: 'BLONP',
@@ -115,7 +121,8 @@ export const SAMPLE_DATA = [
115121
Employees: 34,
116122
DateCreated: new Date(2016, 10, 5, 21, 21, 22),
117123
Time: new Date(2018, 6, 17, 7, 6, 5),
118-
Contract: true
124+
Contract: true,
125+
Discount: 0.05,
119126
},
120127
{
121128
ID: 'BOLID',
@@ -133,6 +140,7 @@ export const SAMPLE_DATA = [
133140
DateCreated: new Date(2016, 4, 20),
134141
Contract: true,
135142
Time: new Date(2018, 6, 7, 7, 7, 7),
143+
Discount: 0.10,
136144
},
137145
{
138146
ID: 'BONAP',
@@ -150,6 +158,7 @@ export const SAMPLE_DATA = [
150158
DateCreated: new Date(2018, 3, 5, 8, 13, 22),
151159
Contract: false,
152160
Time: new Date(2018, 6, 7, 9, 19, 5),
161+
Discount: 0.15,
153162
},
154163
{
155164
ID: 'BOTTM',
@@ -167,6 +176,7 @@ export const SAMPLE_DATA = [
167176
DateCreated: new Date(2017, 6, 10, 7, 33, 22),
168177
Contract: true,
169178
Time: new Date(2018, 6, 7, 7, 6, 5),
179+
Discount: 0.20,
170180
},
171181
{
172182
ID: 'BSBEV',
@@ -183,7 +193,8 @@ export const SAMPLE_DATA = [
183193
Employees: 197,
184194
DateCreated: new Date(2017, 10, 4, 12, 42, 22),
185195
Contract: true,
186-
Time: new Date(2021, 1, 2, 1, 12, 21)
196+
Time: new Date(2021, 1, 2, 1, 12, 21),
197+
Discount: 0.25,
187198
},
188199
{
189200
ID: 'CACTU',
@@ -199,7 +210,8 @@ export const SAMPLE_DATA = [
199210
Fax: '(1) 135-4892',
200211
Employees: 33,
201212
DateCreated: new Date(2014, 5, 12, 11, 17, 22),
202-
Contract: false
213+
Contract: false,
214+
Discount: 0.30,
203215
},
204216
{
205217
ID: 'CENTC',
@@ -215,7 +227,8 @@ export const SAMPLE_DATA = [
215227
Fax: '(5) 555-7293',
216228
Employees: 18,
217229
DateCreated: new Date(2015, 6, 27, 6, 31, 22),
218-
Contract: true
230+
Contract: true,
231+
Discount: 0.05,
219232
},
220233
{
221234
ID: 'CHOPS',
@@ -232,7 +245,8 @@ export const SAMPLE_DATA = [
232245
Employees: 380,
233246
DateCreated: new Date(2011, 8, 6, 4, 11, 22),
234247
Contract: true,
235-
Time: new Date(2023, 7, 12, 4, 42, 21)
248+
Time: new Date(2023, 7, 12, 4, 42, 21),
249+
Discount: 0.10,
236250
},
237251
{
238252
ID: 'COMMI',
@@ -247,7 +261,8 @@ export const SAMPLE_DATA = [
247261
Fax: null,
248262
Employees: 137,
249263
DateCreated: new Date(2012, 6, 10, 16, 31, 22),
250-
Contract: false
264+
Contract: false,
265+
Discount: 0.15,
251266
},
252267
{
253268
ID: 'CONSH',
@@ -264,7 +279,8 @@ export const SAMPLE_DATA = [
264279
Employees: 150,
265280
DateCreated: new Date(2012, 6, 10, 5, 19, 22),
266281
Contract: false,
267-
Time: new Date(2020, 9, 6, 14, 40, 20)
282+
Time: new Date(2020, 9, 6, 14, 40, 20),
283+
Discount: 0.20,
268284
},
269285
{
270286
ID: 'DRACD',
@@ -280,7 +296,8 @@ export const SAMPLE_DATA = [
280296
Fax: '0241-059428',
281297
Employees: 265,
282298
DateCreated: new Date(2014, 9, 11, 3, 31, 22),
283-
Contract: true
299+
Contract: true,
300+
Discount: 0.25,
284301
},
285302
{
286303
ID: 'DUMON',
@@ -297,7 +314,8 @@ export const SAMPLE_DATA = [
297314
Employees: 24,
298315
DateCreated: new Date(2015, 8, 4, 5, 11, 22),
299316
Contract: true,
300-
Time: new Date(2020, 9, 22, 16, 40, 10)
317+
Time: new Date(2020, 9, 22, 16, 40, 10),
318+
Discount: 0.30,
301319
},
302320
{
303321
ID: 'EASTC',
@@ -314,7 +332,8 @@ export const SAMPLE_DATA = [
314332
Employees: 123,
315333
DateCreated: new Date(2013, 4, 18, 15, 39, 22),
316334
Contract: false,
317-
Time: new Date(2020, 5, 4, 17, 30, 15)
335+
Time: new Date(2020, 5, 4, 17, 30, 15),
336+
Discount: 0.05,
318337
},
319338
{
320339
ID: 'ERNSH',
@@ -331,7 +350,8 @@ export const SAMPLE_DATA = [
331350
Employees: 9,
332351
DateCreated: new Date(2013, 7, 9, 15, 31, 22),
333352
Contract: true,
334-
Time: new Date(2020, 4, 7, 17, 30, 15)
353+
Time: new Date(2020, 4, 7, 17, 30, 15),
354+
Discount: 0.10,
335355
},
336356
{
337357
ID: 'FAMIA',
@@ -348,7 +368,8 @@ export const SAMPLE_DATA = [
348368
Employees: 67,
349369
DateCreated: new Date(2015, 6, 17, 16, 22, 22),
350370
Contract: true,
351-
Time: new Date(2020, 5, 17, 17, 45, 55)
371+
Time: new Date(2020, 5, 17, 17, 45, 55),
372+
Discount: 0.15,
352373
},
353374
{
354375
ID: 'FISSA',
@@ -365,7 +386,8 @@ export const SAMPLE_DATA = [
365386
Employees: 87,
366387
DateCreated: new Date(2015, 6, 17, 14, 1, 22),
367388
Contract: false,
368-
Time: new Date(2020, 3, 7, 15, 41, 27)
389+
Time: new Date(2020, 3, 7, 15, 41, 27),
390+
Discount: 0.20,
369391
},
370392
{
371393
ID: 'FOLIG',
@@ -382,7 +404,8 @@ export const SAMPLE_DATA = [
382404
Employees: 37,
383405
DateCreated: new Date(2014, 5, 14, 15, 31, 22),
384406
Contract: false,
385-
Time: new Date(2020, 8, 16, 16, 30, 15)
407+
Time: new Date(2020, 8, 16, 16, 30, 15),
408+
Discount: 0.25,
386409
},
387410
{
388411
ID: 'FOLKO',
@@ -399,7 +422,8 @@ export const SAMPLE_DATA = [
399422
Employees: 42,
400423
DateCreated: new Date(2011, 3, 21, 17, 11, 22),
401424
Contract: true,
402-
Time: new Date(2020, 8, 17, 10, 30, 15)
425+
Time: new Date(2020, 8, 17, 10, 30, 15),
426+
Discount: 0.30,
403427
},
404428
{
405429
ID: 'FRANK',
@@ -416,7 +440,8 @@ export const SAMPLE_DATA = [
416440
Employees: 17,
417441
DateCreated: new Date(2015, 6, 17, 14, 41, 22),
418442
Contract: true,
419-
Time: new Date(2020, 8, 7, 14, 14, 19)
443+
Time: new Date(2020, 8, 7, 14, 14, 19),
444+
Discount: 0.05,
420445
},
421446
{
422447
ID: 'FRANR',
@@ -433,7 +458,8 @@ export const SAMPLE_DATA = [
433458
Employees: 20,
434459
DateCreated: new Date(2011, 7, 14, 15, 21, 22),
435460
Contract: true,
436-
Time: new Date(2020, 6, 7, 20, 14, 15)
461+
Time: new Date(2020, 6, 7, 20, 14, 15),
462+
Discount: 0.10,
437463
},
438464
{
439465
ID: 'FRANS',
@@ -449,7 +475,8 @@ export const SAMPLE_DATA = [
449475
Employees: 5,
450476
DateCreated: new Date(2012, 8, 3, 16, 31, 22),
451477
Contract: false,
452-
Time: new Date(2020, 6, 7, 22, 4, 5)
478+
Time: new Date(2020, 6, 7, 22, 4, 5),
479+
Discount: 0.15,
453480
}
454481
];
455482

0 commit comments

Comments
 (0)