Fix column could not be found due to wrong IDs used

This commit is contained in:
nathangray 2020-06-15 11:42:45 -06:00
parent d0eed9b7a5
commit 8020464dde
2 changed files with 4 additions and 4 deletions

View File

@ -333,8 +333,8 @@ var et2_dataview = /** @class */ (function () {
var relative = self.columnMgr.totalWidth - self.columnMgr.totalFixed + _w;
this.set_width(_w / relative);
for (var i = 0; i < self.columnMgr.columnCount(); i++) {
var col = self.columnMgr.getColumnById(i);
if (col == this || col.fixedWidth)
var col = self.columnMgr.getColumnById('col_' + i);
if (!col || col == this || col.fixedWidth)
continue;
col.set_width(self.columnMgr.getColumnWidth(i) / relative);
}

View File

@ -479,8 +479,8 @@ export class et2_dataview
this.set_width(_w / relative);
for(var i = 0; i < self.columnMgr.columnCount(); i++)
{
var col = self.columnMgr.getColumnById(i);
if(col == this || col.fixedWidth) continue;
var col = self.columnMgr.getColumnById('col_'+i);
if(!col || col == this || col.fixedWidth) continue;
col.set_width(self.columnMgr.getColumnWidth(i) / relative);
}
// Triggers column change callback, which saves