fix grid initialization bug
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 11 Feb 2020 19:15:38 +0000 (14:15 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 11 Feb 2020 19:15:38 +0000 (14:15 -0500)
If an IDL link field has an explicit eg-grid-column definition,
ensure that the datatype is set correctly.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/share/grid/grid.ts

index 741199d..b1fbf90 100644 (file)
@@ -231,9 +231,11 @@ export class GridColumnSet {
             if (idlInfo) {
                 col.idlFieldDef = idlInfo.idlField;
                 col.idlClass = idlInfo.idlClass.name;
+                if (!col.datatype) {
+                    col.datatype = col.idlFieldDef.datatype;
+                }
                 if (!col.label) {
                     col.label = col.idlFieldDef.label || col.idlFieldDef.name;
-                    col.datatype = col.idlFieldDef.datatype;
                 }
             }
         }