@@ -306,7 +306,7 @@ describe('IgxTreeGrid - CRUD', () => {
306
306
} ) ;
307
307
308
308
it ( 'should support updating a root row through the treeGrid API' , ( ) => {
309
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
309
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
310
310
311
311
verifyCellValue ( fix , 0 , 'Name' , 'John Winchester' ) ;
312
312
verifyRowsCount ( fix , 3 , 10 ) ;
@@ -324,7 +324,7 @@ describe('IgxTreeGrid - CRUD', () => {
324
324
fix . detectChanges ( ) ;
325
325
326
326
const rowComponent = treeGrid . getRowByKey ( 999 ) ;
327
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
327
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
328
328
row : rowComponent ,
329
329
cell : null ,
330
330
currentValue : oldRow ,
@@ -335,7 +335,7 @@ describe('IgxTreeGrid - CRUD', () => {
335
335
} ) ;
336
336
337
337
it ( 'should support updating a child row through the treeGrid API' , ( ) => {
338
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
338
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
339
339
340
340
verifyCellValue ( fix , 6 , 'Name' , 'Peter Lewis' ) ;
341
341
verifyRowsCount ( fix , 3 , 10 ) ;
@@ -353,7 +353,7 @@ describe('IgxTreeGrid - CRUD', () => {
353
353
fix . detectChanges ( ) ;
354
354
355
355
const rowComponent = treeGrid . getRowByKey ( 888 ) ;
356
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
356
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
357
357
row : rowComponent ,
358
358
cell : null ,
359
359
currentValue : oldRow ,
@@ -364,7 +364,7 @@ describe('IgxTreeGrid - CRUD', () => {
364
364
} ) ;
365
365
366
366
it ( 'should support updating a child row through the rowObject API' , ( ) => {
367
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
367
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
368
368
369
369
verifyCellValue ( fix , 6 , 'Name' , 'Peter Lewis' ) ;
370
370
verifyRowsCount ( fix , 3 , 10 ) ;
@@ -382,7 +382,7 @@ describe('IgxTreeGrid - CRUD', () => {
382
382
fix . detectChanges ( ) ;
383
383
384
384
const rowComponent = treeGrid . getRowByKey ( 888 ) ;
385
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
385
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
386
386
row : rowComponent ,
387
387
cell : null ,
388
388
currentValue : oldRow ,
@@ -399,7 +399,7 @@ describe('IgxTreeGrid - CRUD', () => {
399
399
treeGrid . moveColumn ( sourceColumn , targetColumn , DropPosition . BeforeDropTarget ) ;
400
400
fix . detectChanges ( ) ;
401
401
402
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
402
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
403
403
404
404
verifyCellValue ( fix , 6 , 'Age' , '25' ) ;
405
405
verifyRowsCount ( fix , 3 , 10 ) ;
@@ -411,7 +411,7 @@ describe('IgxTreeGrid - CRUD', () => {
411
411
fix . detectChanges ( ) ;
412
412
413
413
const cellComponent = treeGrid . getCellByKey ( 299 , 'Age' ) ;
414
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
414
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
415
415
row : cellComponent . row ,
416
416
cell : cellComponent ,
417
417
currentValue : oldCellValue ,
@@ -428,7 +428,7 @@ describe('IgxTreeGrid - CRUD', () => {
428
428
treeGrid . moveColumn ( sourceColumn , targetColumn , DropPosition . BeforeDropTarget ) ;
429
429
fix . detectChanges ( ) ;
430
430
431
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
431
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
432
432
433
433
verifyCellValue ( fix , 6 , 'Age' , '25' ) ;
434
434
verifyRowsCount ( fix , 3 , 10 ) ;
@@ -440,7 +440,7 @@ describe('IgxTreeGrid - CRUD', () => {
440
440
fix . detectChanges ( ) ;
441
441
442
442
const cellComponent = treeGrid . getCellByKey ( 299 , 'Age' ) ;
443
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
443
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
444
444
row : cellComponent . row ,
445
445
cell : cellComponent ,
446
446
currentValue : oldCellValue ,
@@ -460,7 +460,7 @@ describe('IgxTreeGrid - CRUD', () => {
460
460
} ) ;
461
461
462
462
it ( 'should support updating a root row through the treeGrid API' , ( ) => {
463
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
463
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
464
464
465
465
verifyCellValue ( fix , 0 , 'Name' , 'Casey Houston' ) ;
466
466
verifyRowsCount ( fix , 8 , 8 ) ;
@@ -479,7 +479,7 @@ describe('IgxTreeGrid - CRUD', () => {
479
479
fix . detectChanges ( ) ;
480
480
481
481
const rowComponent = treeGrid . getRowByKey ( 1 ) ;
482
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
482
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
483
483
row : rowComponent ,
484
484
cell : null ,
485
485
currentValue : oldRow ,
@@ -491,7 +491,7 @@ describe('IgxTreeGrid - CRUD', () => {
491
491
} ) ;
492
492
493
493
it ( 'should support updating a root row by changing its ID (its children should become root rows)' , ( ) => {
494
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
494
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
495
495
496
496
verifyCellValue ( fix , 0 , 'Name' , 'Casey Houston' ) ;
497
497
verifyRowsCount ( fix , 8 , 8 ) ;
@@ -511,7 +511,7 @@ describe('IgxTreeGrid - CRUD', () => {
511
511
fix . detectChanges ( ) ;
512
512
513
513
const rowComponent = treeGrid . getRowByKey ( 999 ) ;
514
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
514
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
515
515
row : rowComponent ,
516
516
cell : null ,
517
517
currentValue : oldRow ,
@@ -524,7 +524,7 @@ describe('IgxTreeGrid - CRUD', () => {
524
524
} ) ;
525
525
526
526
it ( 'should support updating a child row through the treeGrid API' , ( ) => {
527
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
527
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
528
528
529
529
verifyCellValue ( fix , 3 , 'Name' , 'Debra Morton' ) ;
530
530
verifyRowsCount ( fix , 8 , 8 ) ;
@@ -542,7 +542,7 @@ describe('IgxTreeGrid - CRUD', () => {
542
542
fix . detectChanges ( ) ;
543
543
544
544
const rowComponent = treeGrid . getRowByKey ( 888 ) ;
545
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
545
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
546
546
row : rowComponent ,
547
547
cell : null ,
548
548
currentValue : oldRow ,
@@ -553,7 +553,7 @@ describe('IgxTreeGrid - CRUD', () => {
553
553
} ) ;
554
554
555
555
it ( 'should support updating a child row through the rowObject API' , ( ) => {
556
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
556
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
557
557
558
558
verifyCellValue ( fix , 3 , 'Name' , 'Debra Morton' ) ;
559
559
verifyRowsCount ( fix , 8 , 8 ) ;
@@ -571,7 +571,7 @@ describe('IgxTreeGrid - CRUD', () => {
571
571
fix . detectChanges ( ) ;
572
572
573
573
const rowComponent = treeGrid . getRowByKey ( 888 ) ;
574
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
574
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
575
575
row : rowComponent ,
576
576
cell : null ,
577
577
currentValue : oldRow ,
@@ -582,7 +582,7 @@ describe('IgxTreeGrid - CRUD', () => {
582
582
} ) ;
583
583
584
584
it ( 'should support updating a child row by changing its original parentID' , ( ) => {
585
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
585
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
586
586
587
587
verifyCellValue ( fix , 3 , 'Name' , 'Debra Morton' ) ;
588
588
verifyCellValue ( fix , 5 , 'Name' , 'Erma Walsh' ) ;
@@ -602,7 +602,7 @@ describe('IgxTreeGrid - CRUD', () => {
602
602
fix . detectChanges ( ) ;
603
603
604
604
const rowComponent = treeGrid . getRowByKey ( 4 ) ; // original component: Name = 'Jack Simon'
605
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
605
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
606
606
row : rowComponent ,
607
607
cell : null ,
608
608
currentValue : oldRow ,
@@ -621,7 +621,7 @@ describe('IgxTreeGrid - CRUD', () => {
621
621
treeGrid . moveColumn ( sourceColumn , targetColumn , DropPosition . BeforeDropTarget ) ;
622
622
fix . detectChanges ( ) ;
623
623
624
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
624
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
625
625
626
626
verifyCellValue ( fix , 3 , 'Name' , 'Debra Morton' ) ;
627
627
verifyRowsCount ( fix , 8 , 8 ) ;
@@ -633,7 +633,7 @@ describe('IgxTreeGrid - CRUD', () => {
633
633
fix . detectChanges ( ) ;
634
634
635
635
const cellComponent = treeGrid . getCellByKey ( 7 , 'Name' ) ;
636
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
636
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
637
637
row : cellComponent . row ,
638
638
cell : cellComponent ,
639
639
currentValue : oldCellValue ,
@@ -650,7 +650,7 @@ describe('IgxTreeGrid - CRUD', () => {
650
650
treeGrid . moveColumn ( sourceColumn , targetColumn , DropPosition . BeforeDropTarget ) ;
651
651
fix . detectChanges ( ) ;
652
652
653
- spyOn ( treeGrid . onEditDone , 'emit' ) . and . callThrough ( ) ;
653
+ spyOn ( treeGrid . onCellEdit , 'emit' ) . and . callThrough ( ) ;
654
654
655
655
verifyCellValue ( fix , 3 , 'Name' , 'Debra Morton' ) ;
656
656
verifyRowsCount ( fix , 8 , 8 ) ;
@@ -663,7 +663,7 @@ describe('IgxTreeGrid - CRUD', () => {
663
663
fix . detectChanges ( ) ;
664
664
665
665
const cellComponent = treeGrid . getCellByKey ( 7 , 'Name' ) ;
666
- expect ( treeGrid . onEditDone . emit ) . toHaveBeenCalledWith ( {
666
+ expect ( treeGrid . onCellEdit . emit ) . toHaveBeenCalledWith ( {
667
667
row : cellComponent . row ,
668
668
cell : cellComponent ,
669
669
currentValue : oldCellValue ,
@@ -801,7 +801,7 @@ describe('IgxTreeGrid - CRUD', () => {
801
801
const cellComponent = treeGrid . getCellByColumn ( 0 , 'ID' ) ;
802
802
const cellDomNumber = fix . debugElement . queryAll ( By . css ( CELL_CSS_CLASS ) ) [ 0 ] ;
803
803
804
- treeGrid . onEditDone . pipe ( first ( ) ) . subscribe ( ( args ) => {
804
+ treeGrid . onCellEdit . pipe ( first ( ) ) . subscribe ( ( args ) => {
805
805
expect ( args . newValue ) . toBe ( 146 ) ;
806
806
} ) ;
807
807
@@ -945,7 +945,7 @@ describe('IgxTreeGrid - CRUD', () => {
945
945
const cellComponent = treeGrid . getCellByColumn ( 0 , 'ID' ) ;
946
946
const cellDomNumber = fix . debugElement . queryAll ( By . css ( CELL_CSS_CLASS ) ) [ 0 ] ;
947
947
948
- treeGrid . onEditDone . pipe ( first ( ) ) . subscribe ( ( args ) => {
948
+ treeGrid . onCellEdit . pipe ( first ( ) ) . subscribe ( ( args ) => {
949
949
expect ( args . newValue ) . toBe ( 146 ) ;
950
950
} ) ;
951
951
0 commit comments