Summary#
In createTableHook, AppColumnDefBase and AppDisplayColumnDef enhance cell, header, and footer templates with bound cellComponents and headerComponents via AppCellContext and AppHeaderContext. However, aggregatedCell was not omitted from the base definition and re-typed with AppCellContext, leaving it typed against the standard CellContext. As a result, referencing bound cell components in an aggregatedCell renderer reported TypeScript errors unless cast.
Changes#
- Updated
AppColumnDefBase and AppDisplayColumnDef in createTableHook.tsx to omit aggregatedCell and type it with AppCellContext containing TCellComponents.
- Added test coverage in
packages/react-table/tests/createTableHook.test.tsx verifying type-checking and usage of bound cell components within aggregatedCell.
- Added changeset declaring a patch release for
@tanstack/react-table.
Summary by CodeRabbit#
- Bug Fixes
- Fixed type checking for aggregated cells so their renderers can use registered cell components.
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: TanStack/table/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
cf528fef-e0e8-40a9-be12-3d043a4e41db📥 Commits
Reviewing files that changed from the base of the PR and between 21d713fc4947d2a08cc2136bb055889a61412ded and 0c8d4130372ef2ff768b825ef450f9263f59d8f3.
📒 Files selected for processing (3)
.changeset/fix-aggregated-cell-bound-components.mdpackages/react-table/src/createTableHook.tsxpackages/react-table/tests/createTableHook.test.tsxIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
Aggregate-cell templates in two column definition types now use
AppCellContext, including registered cell components. The test adds aNameCellaggregate renderer, and a changeset records the fix.Changes#
Aggregate cell template typing
packages/react-table/src/createTableHook.tsx,packages/react-table/tests/createTableHook.test.tsx,.changeset/fix-aggregated-cell-bound-components.mdAppColumnDefBaseandAppDisplayColumnDefdeclareaggregatedCelltemplates withAppCellContext. The test adds aNameCellrenderer, and the changeset describes the typing fix.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
kevinvandyMerge Risk: ⚪ Minimal · up to
0c8d4The change aligns aggregate-cell typing with the bound cell components available during React rendering. No merge-blocking risk is evident; proceed with normal checks.
Security Architecture Review#
Security architecture risk: ⚪ Minimal · up to
0c8d4Aggregate-cell renderers gain type-safe access to registered cell components. The reviewed change does not alter how cells are rendered or introduce a new security boundary or capability.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
aggregatedCellagainst boundcellComponentsincreateTableHook.## 🎯 Changes,## ✅ Checklist, or## 🚀 Release Impactheadings, but it i…✨ Finishing Touches
🧪 Generate unit tests (beta)
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