docs: Clarify column visibility toggle labels - #6410
Merged
KevinVandy merged 1 commit intoJul 12, 2026
Conversation
Column visibility menus render column objects, not active header objects, so rendering columnDef.header directly can fail or confuse users when headers are JSX/templates or when columns are hidden. The guide now shows a stable label map fallback and calls out flexRender as the correct path for real header rendering. Related: TanStack#5751 Confidence: high Scope-risk: narrow Tested: pnpm prettier --write docs/framework/react/guide/column-visibility.md; pnpm test:docs Not-tested: Full repository test suite
Contributor
📝 WalkthroughWalkthroughThe React column visibility guide now defines stable labels keyed by column ID, uses them in visibility toggle checkboxes, and explains why ChangesColumn visibility documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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. Comment |
ckdwns9121
marked this pull request as ready for review
July 12, 2026 15:22
KevinVandy
approved these changes
Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
column.columnDef.headerdirectly in a visibility toggle menu.columnDef.headeris a header render template and should be rendered withflexRenderwhen rendering actual headers, while visibility menus should use stable text labels.Why
column.columnDef.headercan be a string or render template that needs header context. In a visibility menu we are rendering column objects, and hidden columns may not have an active header context. This caused confusion in #5751 when JSX/template headers were used as toggle labels.Validation
pnpm prettier --write docs/framework/react/guide/column-visibility.mdpnpm test:docsRelated: #5751
Summary by CodeRabbit