Fix undefined error looking up cell content

This commit is contained in:
nathangray 2020-01-24 05:58:15 -07:00
parent 7bd1f9f986
commit d8fb0c8bee
2 changed files with 6 additions and 4 deletions

View File

@ -414,8 +414,9 @@ var et2_grid = /** @class */ (function (_super) {
for (var name in this.getArrayMgrs()) { for (var name in this.getArrayMgrs()) {
//this.getArrayMgr(name).perspectiveData.row = y; //this.getArrayMgr(name).perspectiveData.row = y;
} }
if (this._getCell(cells, x, y).rowData.id) { var cell = this._getCell(cells, x, y);
this.getArrayMgr("content").expandName(this.rowData[y].id); if (cell.rowData.id) {
this.getArrayMgr("content").expandName(cell.rowData.id);
} }
// If row disabled, just skip it // If row disabled, just skip it
var disabled = false; var disabled = false;

View File

@ -572,9 +572,10 @@ export class et2_grid extends et2_DOMWidget implements et2_IDetachedDOM, et2_IAl
//this.getArrayMgr(name).perspectiveData.row = y; //this.getArrayMgr(name).perspectiveData.row = y;
} }
if(this._getCell(cells, x,y).rowData.id) let cell = this._getCell(cells, x,y);
if(cell.rowData.id)
{ {
this.getArrayMgr("content").expandName(this.rowData[y].id); this.getArrayMgr("content").expandName(cell.rowData.id);
} }
// If row disabled, just skip it // If row disabled, just skip it
let disabled = false; let disabled = false;