Table: Fix justifyContent with cellLink overflow (#90353)

* Table: Fix justifyContent with cellLink overflow

* Add textAlign to fix failing test
pull/90504/head
Drew Slobodnjak 11 months ago committed by GitHub
parent 4ef6ff7c44
commit 4de34ac246
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      packages/grafana-ui/src/components/Table/TableCell.tsx

@ -41,7 +41,14 @@ export const TableCell = ({
if (cellProps.style) {
cellProps.style.minWidth = cellProps.style.width;
cellProps.style.justifyContent = (cell.column as any).justifyContent;
const justifyContent = (cell.column as any).justifyContent;
if (justifyContent === 'flex-end') {
// justify-content flex-end is not compatible with cellLink overflow; use direction instead
cellProps.style.textAlign = 'right';
cellProps.style.direction = 'rtl';
} else {
cellProps.style.justifyContent = justifyContent;
}
}
let innerWidth = (typeof cell.column.width === 'number' ? cell.column.width : 24) - tableStyles.cellPadding * 2;

Loading…
Cancel
Save