Skip to content

fix: resolve invalid DOM nesting in DataTable SeparatorRowRenderer#28293

Draft
dougwithseismic wants to merge 2 commits intocalcom:mainfrom
dougwithseismic:fix/28184-dom-nesting-separator-row
Draft

fix: resolve invalid DOM nesting in DataTable SeparatorRowRenderer#28293
dougwithseismic wants to merge 2 commits intocalcom:mainfrom
dougwithseismic:fix/28184-dom-nesting-separator-row

Conversation

@dougwithseismic
Copy link

What does this PR do?

Fixes #28184

The SeparatorRowRenderer in the DataTable component rendered a <div> directly inside a <TableRow> (<tr>), which is invalid HTML — a <tr> can only contain <td> or <th> elements. This caused React hydration warnings and accessibility issues.

Changes

  • Replace <div> with <TableCell> in SeparatorRowRenderer
  • Add colSpan prop to span all table columns
  • Pass table.getAllColumns().length as the colSpan value at the call site
  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  1. Navigate to any page using DataTable with separator rows (e.g., bookings list grouped by date)
  2. Open browser DevTools and verify no DOM nesting warnings in console
  3. Inspect the separator row — it should be <tr><td colspan="N">...</td></tr> instead of <tr><div>...</div></tr>

Mandatory Tasks

  • I have self-reviewed the code in this PR
  • I have added the relevant tests (if applicable)
  • I have updated the documentation (if applicable)

🤖 Generated with Claude Code

dougwithseismic and others added 2 commits March 5, 2026 15:56
…alcom#28184)

Replace <div> with <TableCell colSpan={...}> inside <TableRow> to fix
invalid DOM nesting (div cannot be a child of tr).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link

CLAassistant commented Mar 5, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the 🐛 bug Something isn't working label Mar 5, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SeparatorRowRenderer renders <div> inside <tr>, causing invalid DOM nesting warning

2 participants