Skip to content

Commit 668ef08

Browse files
committed
feat: review
1 parent 5f41e75 commit 668ef08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Body/BodyRow.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,20 @@ export function getCellProps<RecordType>(
7171
);
7272
}
7373

74-
const addChildrenRowSpan = (rowSpan: number, index2: number) => {
75-
const _index = index2 + 1;
74+
const addChildrenRowSpan = (rowSpan: number, idx: number) => {
75+
const nextIndex = idx + 1;
76+
const rowKey = rowKeys[nextIndex];
7677
let _rowSpan = rowSpan;
77-
const rowKey = rowKeys[_index];
7878
if (rowKey !== undefined) {
7979
// 下面如果是 0 的,增加 +1 逻辑
80-
const thisCellProps = column.onCell(record, _index);
80+
const thisCellProps = column.onCell(record, nextIndex);
8181
if (thisCellProps.rowSpan === 0) {
8282
const thisExpanded = expandedKeys.has(rowKey);
8383
if (thisExpanded) {
8484
_rowSpan = _rowSpan + 1;
8585
}
8686
// 继续往下找
87-
return addChildrenRowSpan(_rowSpan, _index);
87+
return addChildrenRowSpan(_rowSpan, nextIndex);
8888
}
8989
}
9090
// 找不到后返回

0 commit comments

Comments
 (0)