Table: Fix right column alignment (#77339)

This commit is contained in:
Leon Sorokin
2023-10-30 01:09:08 -05:00
committed by GitHub
parent 8683323760
commit 3bc1a8d714
@@ -51,8 +51,14 @@ export const DefaultCell = (props: TableCellProps) => {
const cellStyle = getCellStyle(tableStyles, cellOptions, displayValue, inspectEnabled, isStringValue);
if (isStringValue && cellProps.style?.justifyContent === 'flex-end') {
cellProps.style = { ...cellProps.style, textAlign: 'right' };
if (isStringValue) {
let justifyContent = cellProps.style?.justifyContent;
if (justifyContent === 'flex-end') {
cellProps.style = { ...cellProps.style, textAlign: 'right' };
} else if (justifyContent === 'center') {
cellProps.style = { ...cellProps.style, textAlign: 'center' };
}
}
return (