Skip to content

Commit 9b863fc

Browse files
Merge pull request #3424 from IgniteUI/thristodorova/fix-3421-vnext
fix(grid): refactor excel style editing sample
2 parents c0856b5 + 030f779 commit 9b863fc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/app/grid/grid-editing-excel-style/grid-editing-excel-style.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export class GridExcelStyleEditingComponent implements OnInit {
1616
public grid: IgxGridComponent;
1717

1818
public data: any[];
19+
public shouldAppendValue = false;
1920

2021
public ngOnInit(): void {
2122
this.data = DATA;
@@ -40,7 +41,12 @@ export class GridExcelStyleEditingComponent implements OnInit {
4041
if (cell && !grid.crudService.cellInEditMode) {
4142
grid.crudService.enterEditMode(cell);
4243
cell.editValue = event.key;
43-
}
44+
this.shouldAppendValue = true;
45+
} else if (cell && cell.editMode && this.shouldAppendValue) {
46+
event.preventDefault();
47+
cell.editValue = cell.editValue + event.key;
48+
this.shouldAppendValue = false;
49+
}
4450
}
4551

4652
if (key == 13) {

0 commit comments

Comments
 (0)