From 3b9c6da4eb1e9e98133a353a4b08c7eb9d030ebe Mon Sep 17 00:00:00 2001 From: Nathan Marrs Date: Mon, 22 Jul 2024 16:41:51 -0600 Subject: [PATCH] Table: Fix cell units (#90799) --- packages/grafana-ui/src/components/Table/TableCell.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/Table/TableCell.tsx b/packages/grafana-ui/src/components/Table/TableCell.tsx index 44f616e4642..080c41b8a68 100644 --- a/packages/grafana-ui/src/components/Table/TableCell.tsx +++ b/packages/grafana-ui/src/components/Table/TableCell.tsx @@ -42,7 +42,9 @@ export const TableCell = ({ if (cellProps.style) { cellProps.style.minWidth = cellProps.style.width; const justifyContent = (cell.column as any).justifyContent; - if (justifyContent === 'flex-end') { + + // If cell has a unit we should avoid setting direction to rtl + if (justifyContent === 'flex-end' && !field.config.unit) { // justify-content flex-end is not compatible with cellLink overflow; use direction instead cellProps.style.textAlign = 'right'; cellProps.style.direction = 'rtl';