Turn col.align into classes
authorStephanie Leary <stephanie.leary@equinoxoli.org>
Fri, 17 Mar 2023 16:25:07 +0000 (16:25 +0000)
committerStephanie Leary <stephanie.leary@equinoxoli.org>
Fri, 17 Mar 2023 16:25:07 +0000 (16:25 +0000)
Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org>
Open-ILS/src/eg2/src/app/share/grid/grid.ts

index b792304..efc253f 100644 (file)
@@ -1357,6 +1357,15 @@ export class GridContext {
     setClassNames(row: any, col: GridColumn): string {
         /* set initial classes from specific grids' callbacks */
         const classes = [this.cellClassCallback(row, col)];
+        /* preserve alignmnet, if set */
+        switch (col.align) {
+            case "left":
+                classes.push('text-start');
+            case "right":
+                classes.push('text-end');
+            case "center":
+                classes.push('text-center');
+        }
 
         /* Base classes */
         if (col.datatype)