Skip to content

Commit 1cb0013

Browse files
committed
feat: 去掉 rowSpan > 1 判断,只要 rowSpan = 1 则 +1,如果 rowSpan = undefined 则不 +1
1 parent e606eed commit 1cb0013

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

docs/examples/expandedRowSpan.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ const columns: ColumnsType = [
1616
if (index === 2) props.rowSpan = 0;
1717
if (index === 3) props.rowSpan = 0;
1818
if (index === 4) props.rowSpan = 0;
19-
if (index === 5) props.rowSpan = 1;
20-
19+
if (index === 5) props.rowSpan = undefined;
2120
return props;
2221
},
2322
},

src/Body/BodyRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function getCellProps<RecordType>(
7979

8080
// For expandable row with rowSpan,
8181
// We should increase the rowSpan if the row is expanded
82-
if (expandable && rowSpan > 1) {
82+
if (expandable) {
8383
let currentRowSpan = rowSpan;
8484

8585
for (let i = index; i < index + rowSpan; i += 1) {

0 commit comments

Comments
 (0)