Skip to content

fix: reset background color from overwritten app.css file#2707

Merged
adamdoe merged 1 commit intodevfrom
fix/grid-cell-color
Apr 8, 2026
Merged

fix: reset background color from overwritten app.css file#2707
adamdoe merged 1 commit intodevfrom
fix/grid-cell-color

Conversation

@adamdoe
Copy link
Copy Markdown
Collaborator

@adamdoe adamdoe commented Apr 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 8, 2026 16:28
@adamdoe adamdoe requested review from Viseghoh and khartco as code owners April 8, 2026 16:28
@adamdoe adamdoe merged commit cb63f50 into dev Apr 8, 2026
1 check passed
@adamdoe adamdoe deleted the fix/grid-cell-color branch April 8, 2026 16:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent unintended table cell background colors caused by an overwritten/global app.css, by forcing a background reset at the Table cell (<td>) level.

Changes:

  • Adds an inline backgroundColor: 'initial' to the <td> style in Cell to override external CSS.
  • Keeps existing behavior of stripping textOverflow from the <td> style object.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +19
const tdStyle = { backgroundColor: 'initial', ...style }
delete tdStyle.textOverflow
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants