Table: Fix negative numbers during rtl styling (#91347)

* Table: fix negative numbers during rtl styling

* revert field config unit check as it is no longer needed with fix implemented in this PR

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
This commit is contained in:
Drew Slobodnjak 2024-07-31 15:28:24 -07:00 committed by GitHub
parent 19585c9491
commit e6531d0ecd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,11 +43,11 @@ export const TableCell = ({
cellProps.style.minWidth = cellProps.style.width;
const justifyContent = (cell.column as any).justifyContent;
// If cell has a unit we should avoid setting direction to rtl
if (justifyContent === 'flex-end' && !field.config.unit) {
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';
cellProps.style.unicodeBidi = 'plaintext';
} else {
cellProps.style.justifyContent = justifyContent;
}