Skip to content

Add getLeafHeaders() method to skip group headers - #6579

Open
sarathkumarsasi wants to merge 1 commit into
TanStack:mainfrom
qburst:feat-leaf-headers-only
Open

Add getLeafHeaders() method to skip group headers#6579
sarathkumarsasi wants to merge 1 commit into
TanStack:mainfrom
qburst:feat-leaf-headers-only

Conversation

@sarathkumarsasi

@sarathkumarsasi sarathkumarsasi commented Aug 28, 2026

Copy link
Copy Markdown

🎯 Changes:

Fixes: #6573
collectLeafHeaders now excludes parent/group headers from results. table_getLeafHeaders returns only real leaf headers instead of placeholders

Summary by CodeRabbit

  • Bug Fixes

    • Corrected leaf-header retrieval to return only actual nested leaf headers.
    • Preserved left-to-right ordering while excluding group, parent, and placeholder headers.
  • Documentation

    • Clarified the behavior of leaf-header retrieval in the Header Objects guide.

`collectLeafHeaders` now excludes parent/group headers from results
`table_getLeafHeaders` returns only real leaf headers instead of
placeholders
Fix the issue: Leaf rows are not calculated correctly TanStack#6573
@coderabbitai

coderabbitai Bot commented Aug 28, 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: Pro Plus

Run ID: 2ddbc731-b9f9-40dd-94f9-11bcf1a67651

📥 Commits

Reviewing files that changed from the base of the PR and between 3bfc1bf and cf84ef9.

📒 Files selected for processing (3)
  • docs/guide/headers.md
  • packages/table-core/src/core/headers/coreHeadersFeature.utils.ts
  • packages/table-core/tests/unit/core/headers/coreHeadersFeature.utils.test.ts

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


📝 Walkthrough

Walkthrough

The header utilities now return only real leaf headers in left-to-right order. Documentation describes the behavior, and unit tests cover nested, group, intermediate, and placeholder headers.

Changes

Leaf header collection

Layer / File(s) Summary
Leaf header behavior
packages/table-core/src/core/headers/coreHeadersFeature.utils.ts, docs/guide/headers.md
collectLeafHeaders now returns only leaf headers. The guide documents the leaf-only behavior and ordering.
Leaf header validation
packages/table-core/tests/unit/core/headers/coreHeadersFeature.utils.test.ts
Tests exclude group, intermediate, and placeholder headers and verify the returned header identities.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to cf84e

This change makes leaf-header collection return only real leaf headers, with matching tests and documentation updates. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: kevinvandy

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description accurately summarizes the leaf-header behavior and references issue #6573, but it omits the required Checklist and Release Impact sections. Add the required Checklist section and mark each applicable item. Add the Release Impact section and select whether the change affects published code or is docs/CI/dev-only.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: adding or exposing getLeafHeaders() behavior that skips group headers.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ 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.

@sarathkumarsasi sarathkumarsasi changed the title Add getLeafHeaders() method to skip group headers Add getLeafHeaders() method to skip group headers #6573 Aug 28, 2026
@sarathkumarsasi sarathkumarsasi changed the title Add getLeafHeaders() method to skip group headers #6573 Add getLeafHeaders() method to skip group headers Aug 28, 2026
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.

Leaf rows are not calculated correctly

1 participant