Release there were some issues with the way removing columns was being implemented.

So I decided to scrap that, and go for just having a hidden column style. This is what
@madshall did in his enhanced table pull request, so this is basically the hidden
column style feature form his pull request.
This commit is contained in:
slqgsm
2016-07-29 20:21:59 +00:00
parent 93cb08d9d0
commit e17b1548e8
5 changed files with 17 additions and 24 deletions

View File

@@ -45,6 +45,12 @@ export class TableRenderer {
return this.defaultCellFormater;
}
if (style.type === 'hidden') {
return v => {
return undefined;
};
}
if (style.type === 'date') {
return v => {
if (_.isArray(v)) { v = v[0]; }
@@ -119,6 +125,13 @@ export class TableRenderer {
widthHack = '<div class="table-panel-width-hack">' + this.table.columns[columnIndex].text + '</div>';
}
if (value === undefined) {
style = ' style="display:none;"';
this.table.columns[columnIndex].hidden = true;
} else {
this.table.columns[columnIndex].hidden = false;
}
return '<td' + style + '>' + value + widthHack + '</td>';
}