Fix context menus in grids (#2245)

* fix context menus

* fix edit data context menu
This commit is contained in:
Anthony Dresser
2018-08-16 17:34:52 -07:00
committed by Karl Burtram
parent 173842510c
commit a8f21b56f0
2 changed files with 20 additions and 15 deletions

View File

@@ -228,8 +228,12 @@ export abstract class GridParentComponent {
protected getSelection(index?: number): ISlickRange[] {
let selection = this.slickgrids.toArray()[index || this.activeGrid].getSelectedRanges();
selection = selection.map(c => { return <ISlickRange>{ fromCell: c.fromCell - 1, toCell: c.toCell - 1, toRow: c.toRow, fromRow: c.fromRow }; });
return selection;
if (selection) {
selection = selection.map(c => { return <ISlickRange>{ fromCell: c.fromCell - 1, toCell: c.toCell - 1, toRow: c.toRow, fromRow: c.fromRow }; });
return selection;
} else {
return undefined;
}
}
private copySelection(): void {