Skip to content

fix(table-core): restore aggregate cell fallback - #6585

Open
ousamabenyounes wants to merge 1 commit into
TanStack:mainfrom
ousamabenyounes:fix/issue-5778
Open

fix(table-core): restore aggregate cell fallback#6585
ousamabenyounes wants to merge 1 commit into
TanStack:mainfrom
ousamabenyounes:fix/issue-5778

Conversation

@ousamabenyounes

@ousamabenyounes ousamabenyounes commented Sep 5, 2026

Copy link
Copy Markdown

🎯 Changes

Closes #5778.

  • Remove the row aggregation feature's default aggregatedCell renderer so getDefaultColumnDef no longer reports one.
  • Add a shared aggregate-cell renderer fallback used by core and adapters: explicit aggregatedCell, then custom cell, then the default aggregate formatter.
  • Add regression coverage for aggregated cells without aggregatedCell, including the no-custom-cell aggregate formatter path.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm test and pnpm test:e2e, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

Local checks run:

  • pnpm --filter @tanstack/table-core exec vitest run tests/unit/flex-render.test.ts tests/implementation/features/row-aggregation/rowAggregationFeature.test.ts
  • pnpm --filter @tanstack/table-core exec vitest run --coverage --coverage.reporter=lcov --coverage.reporter=text-summary
  • pnpm --filter @tanstack/table-core test:eslint
  • pnpm --filter @tanstack/table-core test:types
  • pnpm --filter @tanstack/table-core build
  • adapter lint/type/lib/build checks for React, Preact, Alpine, Lit, Octane, Solid, Angular, Vue, Svelte, and Ember

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 0cc9b465-a444-4e25-92bf-e35b7ed8a3fb

📥 Commits

Reviewing files that changed from the base of the PR and between 36733a3 and 618efb0.

📒 Files selected for processing (17)
  • .changeset/clean-aggregate-fallback.md
  • packages/alpine-table/src/flexRender.ts
  • packages/angular-table/src/helpers/flexRenderCell.ts
  • packages/ember-table/src/FlexRender.gts
  • packages/lit-table/src/flexRender.ts
  • packages/octane-table/src/FlexRender.ts
  • packages/preact-table/src/FlexRender.tsx
  • packages/react-table/src/FlexRender.tsx
  • packages/solid-table/src/FlexRender.tsx
  • packages/svelte-table/src/FlexRender.svelte
  • packages/table-core/src/core/columns/coreColumnsFeature.utils.ts
  • packages/table-core/src/core/columns/defaultColumnCell.ts
  • packages/table-core/src/features/row-aggregation/rowAggregationFeature.ts
  • packages/table-core/src/flex-render.ts
  • packages/table-core/tests/implementation/features/row-aggregation/rowAggregationFeature.test.ts
  • packages/table-core/tests/unit/flex-render.test.ts
  • packages/vue-table/src/FlexRender.ts
💤 Files with no reviewable changes (1)
  • packages/table-core/src/features/row-aggregation/rowAggregationFeature.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Aggregated-cell rendering now uses a shared table-core helper. It prioritizes aggregatedCell, then a custom cell, then formatted aggregate output. All framework adapters use this helper, with tests and patch release metadata updated.

Changes

Aggregated cell fallback

Layer / File(s) Summary
Centralized renderer selection
packages/table-core/src/flex-render.ts, packages/table-core/src/core/columns/*
Table-core adds getAggregatedCellRender and extracts defaultColumnCell. Aggregated rendering now selects aggregatedCell, a custom cell, or formatted aggregate output.
Framework adapter wiring
packages/{alpine,angular,ember,lit,octane,preact,react,solid,svelte,vue}-table/...
Framework-specific FlexRender implementations delegate aggregated-cell renderer selection to table-core.
Behavior tests and release metadata
packages/table-core/tests/..., .changeset/clean-aggregate-fallback.md
Tests cover custom cell and formatted aggregate fallbacks. A changeset records patch releases for the table packages.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 618ef

Aggregated cells now use an explicit aggregate renderer when present, otherwise preserve custom cell formatting before using the default aggregate formatter. The change is covered by core regression tests and is ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant FrameworkFlexRender
  participant TableCore
  participant ColumnDefinition
  FrameworkFlexRender->>TableCore: getAggregatedCellRender(cell)
  TableCore->>ColumnDefinition: inspect aggregatedCell and cell
  ColumnDefinition-->>TableCore: return configured renderer or no renderer
  TableCore-->>FrameworkFlexRender: return renderer or formatted aggregate fallback
Loading

Suggested reviewers: kevinvandy, riccardoperra

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR satisfies issue #5778 by removing the default row aggregation renderer and allowing aggregated cells to fall back to the column's custom cell renderer before using the aggregate formatter.
Out of Scope Changes check ✅ Passed The changes remain within scope. The adapter updates, shared fallback helper, core changes, regression tests, and changeset all support the aggregate-cell fallback objective.
Docstring Coverage ✅ Passed Docstring coverage is 90.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 13 files. (3 skipped: 3…
Description check ✅ Passed The description clearly explains the aggregate-cell fallback changes, motivation, regression coverage, test commands, and release impact. It includes all required template sections and completed check…
Title check ✅ Passed The title is concise and accurately identifies the main change: restoring aggregate-cell fallback behavior in table-core.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

ColumnGrouping.getDefaultColumnDef should not return aggregatedCell

1 participant