feat: expose item index in rowKey callback - #67
Conversation
|
@aojunhao123 is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 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 #67 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 222 224 +2
Branches 61 61
=========================================
+ Hits 222 224 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0339980 to
ab5eb75
Compare
`rowKey` could only resolve identity from the item itself, which fails when identity lives outside the data (e.g. a parallel key array). Align the callback with rc-table's `(record, index) => Key`. The index is the item position in the original `items` array, not the rendered position - grouping reorders rows while the index stays stable. This matches the index already passed to `itemRender`.
ab5eb75 to
1284b3c
Compare
indexproperty in ListyrowKeycallback ant-design/ant-design#59331