Skip to content

Commit 29a5509

Browse files
authored
Merge pull request #13438 from IgniteUI/thristodorova/fix-13433-15.1.x
fix(grid): add return type and return value to endEdit method
2 parents 1318ca4 + 30384ce commit 29a5509

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

projects/igniteui-angular/src/lib/grids/common/crud.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ export class IgxGridCRUDService extends IgxRowAddCrudState {
676676
}
677677

678678
/**
679-
* Finishes the row transactions on the current row.
679+
* Finishes the row transactions on the current row and returns whether the grid editing was canceled.
680680
*
681681
* @remarks
682682
* If `commit === true`, passes them from the pending state to the data (or transaction service)
@@ -687,7 +687,7 @@ export class IgxGridCRUDService extends IgxRowAddCrudState {
687687
* @param commit
688688
*/
689689
// TODO: Implement the same representation of the method without evt emission.
690-
public endEdit(commit = true, event?: Event) {
690+
public endEdit(commit = true, event?: Event): boolean {
691691
if (!this.row && !this.cell) {
692692
return;
693693
}

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6348,7 +6348,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
63486348
}
63496349

63506350
/**
6351-
* Finishes the row transactions on the current row.
6351+
* Finishes the row transactions on the current row and returns whether the grid editing was canceled.
63526352
*
63536353
* @remarks
63546354
* If `commit === true`, passes them from the pending state to the data (or transaction service)
@@ -6360,8 +6360,8 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
63606360
*/
63616361
// TODO: Facade for crud service refactoring. To be removed
63626362
// TODO: do not remove this, as it is used in rowEditTemplate, but mark is as internal and hidden
6363-
public endEdit(commit = true, event?: Event) {
6364-
this.crudService.endEdit(commit, event);
6363+
public endEdit(commit = true, event?: Event): boolean {
6364+
return this.crudService.endEdit(commit, event);
63656365
}
63666366

63676367
/**

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,8 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
13581358
/**
13591359
* @hidden @internal
13601360
*/
1361-
public override endEdit(_commit = true, _event?: Event) {
1361+
public override endEdit(_commit = true, _event?: Event): boolean {
1362+
return;
13621363
}
13631364

13641365
/**

0 commit comments

Comments
 (0)