Skip to content

Commit 75d78db

Browse files
committed
Fix RaDataTable-rowCell CSS class is not applied on <DataTable> cells
1 parent 9c8a01e commit 75d78db

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/ra-ui-materialui/src/list/datatable/DataTable.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ export const SX = () => (
239239
'& .RaDataTable-rowOdd': {
240240
backgroundColor: '#fee',
241241
},
242+
'& .RaDataTable-rowCell': {
243+
color: 'red',
244+
},
242245
}}
243246
>
244247
<DataTable.Col source="id" />

packages/ra-ui-materialui/src/list/datatable/DataTableCell.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import get from 'lodash/get';
66
import clsx from 'clsx';
77

88
import { DataTableColumnProps } from './DataTableColumn';
9+
import { DataTableClasses } from './DataTableRoot';
910

1011
const PREFIX = 'RaDataTableCell';
1112

@@ -55,6 +56,7 @@ export const DataTableCell = React.memo(
5556
<TableCellStyled
5657
ref={ref}
5758
className={clsx(
59+
DataTableClasses.rowCell,
5860
className,
5961
cellClassName,
6062
`column-${source}`

0 commit comments

Comments
 (0)