Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/core/components/Table/components/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const Cell = ({ children, style, isBold = false, ariaLabel }) => {
// Only include aria-label if it has a value
const ariaProps = ariaLabel ? { 'aria-label': ariaLabel } : {}

// Keep whiteSpace on td style so it can be detected by tests and for proper rendering
const tdStyle = { ...style }
delete tdStyle.textOverflow
// Keep whiteSpace on td style so it can be detected by tests and for proper rendering
const tdStyle = { backgroundColor: 'initial', ...style }
delete tdStyle.textOverflow
Comment on lines +18 to +19
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting backgroundColor as an inline style on every <td> will override stylesheet-driven cell backgrounds, including Bootstrap’s .table-striped (used by DataTable via className: 'table table-striped …'). This likely removes zebra striping/other theming and makes background styling impossible via table-level CSS selectors. Consider making this background reset opt-in (e.g., a resetCellBackground prop passed from Table based on a specific class) or solving it via a more targeted CSS rule that doesn’t globally override all cell backgrounds.

Suggested change
const tdStyle = { backgroundColor: 'initial', ...style }
delete tdStyle.textOverflow
const { textOverflow, ...tdStyle } = style || {}

Copilot uses AI. Check for mistakes.

return (
<td {...ariaProps} role='gridcell' style={tdStyle}>
Expand Down
Loading