LP1821382 Angular boolean yes/no display component
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / share / grid / grid.ts
index 64f3321..7cf5f53 100644 (file)
@@ -26,6 +26,7 @@ export class GridColumn {
     idlFieldDef: any;
     datatype: string;
     datePlusTime: boolean;
+    ternaryBool: boolean;
     cellTemplate: TemplateRef<any>;
     cellContext: any;
     isIndex: boolean;
@@ -658,6 +659,12 @@ export class GridContext {
             val = this.getObjectFieldValue(row, col.name);
         }
 
+        if (col.datatype === 'bool') {
+            // Avoid string-ifying bools so we can use an <eg-bool/>
+            // in the grid template.
+            return val;
+        }
+
         return this.format.transform({
             value: val,
             idlClass: col.idlClass,