class="eg-grid-cell eg-grid-header-cell" [ngStyle]="{flex:col.flex}">
<a class="sortable label-with-material-icon" *ngIf="col.isSortable"
(click)="sortOneColumn(col)">
- <span class="eg-grid-header-cell-sort-label">{{col.label}}</span>
+ <span class="eg-grid-header-cell-sort-label">{{col.headerLabel}}</span>
<span class="material-icons eg-grid-header-cell-sort-arrow"
*ngIf="isColumnSorting(col, 'ASC')">arrow_upwards</span>
<span class="material-icons eg-grid-header-cell-sort-arrow"
*ngIf="isColumnSorting(col, 'DESC')">arrow_downwards</span>
</a>
- <span *ngIf="!col.isSortable">{{col.label}}</span>
+ <span *ngIf="!col.isSortable">{{col.headerLabel}}</span>
</div>
</div>
<div *ngIf="context.isFilterable"
name: string;
path: string;
label: string;
+ headerLabel: string;
flex: number;
align: string;
hidden: boolean;
newCol.isAuto = true;
newCol.path = dotpath ? dotpath + '.' + field.name : field.name;
newCol.label = dotpath ? classObj.label + ': ' + field.label : field.label;
+ newCol.datatype = field.datatype;
+
+ // Avoid including the class label prefix in the main grid
+ // header display so it doesn't take up so much horizontal space.
+ newCol.headerLabel = field.label;
this.add(newCol);
});
if (!col.align) { col.align = 'left'; }
if (!col.label) { col.label = col.name; }
if (!col.datatype) { col.datatype = 'text'; }
+ if (!col.isAuto) { col.headerLabel = col.label; }
col.visible = !col.hidden;
}