Skip to content

Commit 9f20f71

Browse files
committed
EditableGrid: Fix right-aligned columns
1 parent 4e61b54 commit 9f20f71

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/components/src/internal/components/editable/EditableGrid.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ function inputCellFactory(
178178
const { isReadonlyCell, isReadonlyRow } = editorModel.getCellReadStatus(fieldKey, rowIdx, readonlyRows);
179179
const rowContainer = editorModel.getFolderValueForRow(rowIdx);
180180
const focused = editorModel.isFocused(colIdx, rowIdx);
181-
const className = getTextAlignClassName(columnMetadata);
182181

183182
// If we're updating then we want to use the container path from each row if present
184183
if (forUpdate && rowContainer) containerPath = rowContainer;
@@ -218,7 +217,7 @@ function inputCellFactory(
218217
}
219218

220219
return (
221-
<td className={className} key={inputCellKey(c.raw, row)}>
220+
<td key={inputCellKey(c.raw, row)}>
222221
<Cell
223222
borderMaskBottom={borderMask[2]}
224223
borderMaskLeft={borderMask[3]}

packages/components/src/theme/grid.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,10 @@ $table-cell-padding: 4px 2px;
464464
width: 100%;
465465
}
466466

467+
.cell-align-right {
468+
text-align: right;
469+
}
470+
467471
.cell-content-value, .cell-menu-value {
468472
display: inline-block;
469473
padding: $table-cell-padding;

0 commit comments

Comments
 (0)