We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 532e524 commit 239af54Copy full SHA for 239af54
src/Body/BodyRow.tsx
@@ -31,7 +31,7 @@ export function getCellProps<RecordType>(
31
colIndex: number,
32
indent: number,
33
index: number,
34
- getRowKey: (index: number) => React.Key,
+ getRowKey?: (index: number) => React.Key,
35
) {
36
const {
37
record,
@@ -77,7 +77,7 @@ export function getCellProps<RecordType>(
77
// 下面如果是 0 的,增加 +1 逻辑
78
const thisCellProps = column.onCell(record, _index);
79
if (thisCellProps.rowSpan === 0) {
80
- const thisExpanded = expandedKeys.has(getRowKey(_index));
+ const thisExpanded = expandedKeys.has(getRowKey?.(_index));
81
if (thisExpanded) {
82
_rowSpan = _rowSpan + 1;
83
}
0 commit comments