feat(table-core): fix API to calculate max expanded row depth#6120
feat(table-core): fix API to calculate max expanded row depth#6120ugjjffu wants to merge 5 commits intoTanStack:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 5c43c9c The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe row expansion feature now removes collapsed rows and their entire descendant hierarchy from the expanded state, rather than just removing the single row entry. This ensures complete cleanup of nested expanded rows when a parent row is collapsed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
examples/react/basic/src/data.ts(1 hunks)packages/table-core/src/features/RowExpanding.ts(1 hunks)
🔇 Additional comments (1)
examples/react/basic/src/data.ts (1)
1-44: LGTM! Well-structured example data.The hierarchical data structure with multi-level nesting effectively demonstrates the row expansion functionality. The inline comment on line 6 and line 27 helpfully highlight the nesting capability.
agree Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
remove abundant data.ts
|
Hey @lachlancollins, could you spare a minute for a quick re-review? Thanks a lot! |
🎯 Changes
I fixed a logic bug in the toggleExpanded function that led to an incorrect calculation of tableDepth. The original logic only deleted the expanded row's ID, but it failed to recursively delete the IDs of its hidden child rows. I fixed this bug by implementing a recursive deletion mechanism to ensure all dependent child rows are correctly removed from the expanded state.
✅ Checklist
pnpm test:pr.🚀 Release Impact
Summary by CodeRabbit
Release Notes
Bug Fixes
Breaking Changes