From 5ca9c6fddc888bf98092db91b3751c2329f2b07b Mon Sep 17 00:00:00 2001 From: Stephanie Leary Date: Fri, 17 Mar 2023 16:25:07 +0000 Subject: [PATCH] Turn col.align into classes Signed-off-by: Stephanie Leary --- Open-ILS/src/eg2/src/app/share/grid/grid.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.ts index b7923047b0..efc253faa8 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.ts @@ -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) -- 2.11.0