From 1355c63ab89b26d528f3846178cabf867220be19 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 29 Jun 2021 11:42:40 -0400 Subject: [PATCH] LP1904036 Grid auto columns label/etc fixes * Ensure the datatype is propagated to auto columns. * Display 'class: fieldname' in the column picker, but only display field name in the grid header to avoid large column names. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/grid/grid-column.component.ts | 1 + Open-ILS/src/eg2/src/app/share/grid/grid-header.component.html | 4 ++-- Open-ILS/src/eg2/src/app/share/grid/grid.ts | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-column.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-column.component.ts index 3eda21675a..4b0a93edd3 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-column.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-column.component.ts @@ -90,6 +90,7 @@ export class GridColumnComponent implements OnInit { col.dateOnlyIntervalField = this.dateOnlyIntervalField; col.idlClass = this.idlClass; col.isAuto = false; + this.grid.context.columnSet.add(col); if (this.cellTemplate && diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-header.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid-header.component.html index a68076514c..a3d0a6b138 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-header.component.html +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-header.component.html @@ -28,13 +28,13 @@ class="eg-grid-cell eg-grid-header-cell" [ngStyle]="{flex:col.flex}"> - {{col.label}} + {{col.headerLabel}} arrow_upwards arrow_downwards - {{col.label}} + {{col.headerLabel}}