Skip to content

Commit 9a73605

Browse files
authored
Merge pull request #3426 from IgniteUI/vnext
deploy latest changes on production
2 parents bd73c24 + cf226bc commit 9a73605

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

live-editing/configs/GridConfigGenerator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,9 +1071,9 @@ export class GridConfigGenerator implements IConfigGenerator {
10711071
component: 'GridCollapsibleColumnGroupsComponent',
10721072
additionalFiles: ['/src/app/directives/prevent-scroll.directive.ts', '/src/app/data/invoiceData.ts'],
10731073
appModuleConfig: new AppModuleConfig({
1074-
imports: ['GridCollapsibleColumnGroupsComponent', 'IgxGridModule', 'IgxTooltipModule', 'IgxPreventDocumentScrollModule'],
1074+
imports: ['GridCollapsibleColumnGroupsComponent', 'IgxGridModule', 'IgxTooltipModule', 'IgxPreventDocumentScrollModule', 'IgxIconModule'],
10751075
ngDeclarations: ['GridCollapsibleColumnGroupsComponent'],
1076-
ngImports: ['IgxPreventDocumentScrollModule', 'IgxGridModule', 'IgxTooltipModule']
1076+
ngImports: ['IgxPreventDocumentScrollModule', 'IgxGridModule', 'IgxTooltipModule', 'IgxIconModule']
10771077
})
10781078
}));
10791079

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

Lines changed: 9 additions & 3 deletions
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;
@@ -37,10 +38,15 @@ export class GridExcelStyleEditingComponent implements OnInit {
3738

3839
const columnName = grid.getColumnByVisibleIndex(activeElem.column).field;
3940
const cell = grid.getCellByColumn(activeElem.row, columnName);
40-
if (cell && !grid.crudService.cellInEditMode) {
41-
grid.crudService.enterEditMode(cell);
41+
if (cell && !cell.editMode) {
42+
cell.editMode = true;
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)