fix: reset background color from overwritten app.css file#2707
Conversation
There was a problem hiding this comment.
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 inCellto override external CSS. - Keeps existing behavior of stripping
textOverflowfrom the<td>style object.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const tdStyle = { backgroundColor: 'initial', ...style } | ||
| delete tdStyle.textOverflow |
There was a problem hiding this comment.
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.
| const tdStyle = { backgroundColor: 'initial', ...style } | |
| delete tdStyle.textOverflow | |
| const { textOverflow, ...tdStyle } = style || {} |
No description provided.