-
-
Couldn't load subscription status.
- Fork 3.4k
feat(table-core): fix API to calculate max expanded row depth #6120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
🎯 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