Fix typescript conversion bug breaking mobile list view

This commit is contained in:
nathangray 2020-04-01 13:46:05 -04:00
parent c8906e4353
commit abdffc12a0
2 changed files with 14 additions and 12 deletions

View File

@ -740,6 +740,11 @@ var et2_nextmatch = /** @class */ (function (_super) {
else { else {
colName = this._getColumnName(_row[i].widget); colName = this._getColumnName(_row[i].widget);
} }
if (!negated) {
_colData[i].order = typeof order[colName] === 'undefined' ? i : order[colName];
}
if (!colName)
continue;
_colData[i].visible = negated; _colData[i].visible = negated;
var stop_1 = false; var stop_1 = false;
for (var j = 0; j < columnDisplay.length && !stop_1; j++) { for (var j = 0; j < columnDisplay.length && !stop_1; j++) {
@ -748,11 +753,6 @@ var et2_nextmatch = /** @class */ (function (_super) {
stop_1 = true; stop_1 = true;
} }
} }
if (!negated) {
_colData[i].order = typeof order[colName] === 'undefined' ? i : order[colName];
}
if (!colName)
continue;
if (size[colName]) { if (size[colName]) {
// Make sure percentages stay percentages, and forget any preference otherwise // Make sure percentages stay percentages, and forget any preference otherwise
if (_colData[i].width.charAt(_colData[i].width.length - 1) == "%") { if (_colData[i].width.charAt(_colData[i].width.length - 1) == "%") {
@ -915,7 +915,8 @@ var et2_nextmatch = /** @class */ (function (_super) {
} }
else if (!colName) { else if (!colName) {
// Unnamed column cannot be toggled or saved // Unnamed column cannot be toggled or saved
columnData[x].visibility = et2_dataview_grid.ET2_COL_VISIBILITY_ALWAYS_NOSELECT; columnData[x].visibility = et2_dataview_model_columns_1.et2_dataview_column.ET2_COL_VISIBILITY_ALWAYS_NOSELECT;
this.columns[x].visible = true;
} }
} }
// Remove action column // Remove action column

View File

@ -1054,6 +1054,11 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
{ {
colName = this._getColumnName(_row[i].widget); colName = this._getColumnName(_row[i].widget);
} }
if(!negated)
{
_colData[i].order = typeof order[colName] === 'undefined' ? i : order[colName];
}
if(!colName) continue;
_colData[i].visible = negated; _colData[i].visible = negated;
let stop = false; let stop = false;
for(var j = 0; j < columnDisplay.length && !stop; j++) for(var j = 0; j < columnDisplay.length && !stop; j++)
@ -1064,11 +1069,6 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
stop = true; stop = true;
} }
} }
if(!negated)
{
_colData[i].order = typeof order[colName] === 'undefined' ? i : order[colName];
}
if(!colName) continue;
if(size[colName]) if(size[colName])
{ {
@ -1275,7 +1275,8 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
else if (!colName) else if (!colName)
{ {
// Unnamed column cannot be toggled or saved // Unnamed column cannot be toggled or saved
columnData[x].visibility = et2_dataview_grid.ET2_COL_VISIBILITY_ALWAYS_NOSELECT; columnData[x].visibility = et2_dataview_column.ET2_COL_VISIBILITY_ALWAYS_NOSELECT;
this.columns[x].visible = true;
} }
} }