Skip to content

Commit 239af54

Browse files
committed
feat: review
1 parent 532e524 commit 239af54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Body/BodyRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function getCellProps<RecordType>(
3131
colIndex: number,
3232
indent: number,
3333
index: number,
34-
getRowKey: (index: number) => React.Key,
34+
getRowKey?: (index: number) => React.Key,
3535
) {
3636
const {
3737
record,
@@ -77,7 +77,7 @@ export function getCellProps<RecordType>(
7777
// 下面如果是 0 的,增加 +1 逻辑
7878
const thisCellProps = column.onCell(record, _index);
7979
if (thisCellProps.rowSpan === 0) {
80-
const thisExpanded = expandedKeys.has(getRowKey(_index));
80+
const thisExpanded = expandedKeys.has(getRowKey?.(_index));
8181
if (thisExpanded) {
8282
_rowSpan = _rowSpan + 1;
8383
}

0 commit comments

Comments
 (0)