fix: honor rowExpandable for tree data - #1508
Conversation
|
@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughChanges
行级展开条件
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change narrows tree-row expansion, icon, and row-click behavior to honor Sequence Diagram(s)sequenceDiagram
participant TableBody
participant useFlattenRecords
participant rowExpandable
participant RowRenderer
TableBody->>useFlattenRecords: 传入树形数据和 rowExpandable
useFlattenRecords->>rowExpandable: 检查记录是否可展开
rowExpandable-->>useFlattenRecords: 返回 true 或 false
useFlattenRecords-->>RowRenderer: 返回过滤后的展平记录
RowRenderer-->>TableBody: 渲染展开行或间隔图标
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1508 +/- ##
=======================================
Coverage 99.08% 99.09%
=======================================
Files 45 45
Lines 1428 1436 +8
Branches 433 440 +7
=======================================
+ Hits 1415 1423 +8
Misses 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
rowExpandableto nested tree rows, including expand icons and row-click behaviordefaultExpandAllRowsfrom revealing children of non-expandable rowschildrenarrays as non-expandable and cover standard and virtual tablesVerification
7977f2b45a501728dddf0853466c1a013a7190dctests/ExpandRow.spec.jsx -t "honors rowExpandable for tree data"failed becauseblocked-childwas renderedpnpm test— 21 files, 239 tests passedpnpm tsc— passedpnpm lint— 0 errors, 23 pre-existing warningspnpm compile— passedgit diff --check— passedFixes #1416
AI assistance disclosure: Codex was used to trace the tree expansion paths, implement the fix, and draft tests. The behavior was reproduced on the exact base before implementation, and all listed checks were run locally.
Summary by CodeRabbit
rowExpandable配置未完全生效的问题。defaultExpandAllRows现在仅展开符合条件的行。