diff --git a/src/Cell/index.tsx b/src/Cell/index.tsx index 53be1ba60..43a129f82 100644 --- a/src/Cell/index.tsx +++ b/src/Cell/index.tsx @@ -147,8 +147,8 @@ function Cell( const componentProps = { title, ...additionalProps, - colSpan: mergedColSpan, - rowSpan: mergedRowSpan, + colSpan: mergedColSpan && mergedColSpan !== 1 ? mergedColSpan : null, + rowSpan: mergedRowSpan && mergedRowSpan !== 1 ? mergedRowSpan : null, className: classNames( cellPrefixCls, className, diff --git a/tests/__snapshots__/ExpandRow.spec.js.snap b/tests/__snapshots__/ExpandRow.spec.js.snap index 602ce045e..dae17bc72 100644 --- a/tests/__snapshots__/ExpandRow.spec.js.snap +++ b/tests/__snapshots__/ExpandRow.spec.js.snap @@ -23,29 +23,21 @@ exports[`Table.Expand renders fixed column correctly 1`] = ` Name Age Gender @@ -169,15 +161,11 @@ exports[`Table.Expand renders tree row correctly 1`] = ` Name Age diff --git a/tests/__snapshots__/FixedColumn.spec.js.snap b/tests/__snapshots__/FixedColumn.spec.js.snap index c2b0332f9..1353aba48 100644 --- a/tests/__snapshots__/FixedColumn.spec.js.snap +++ b/tests/__snapshots__/FixedColumn.spec.js.snap @@ -35,87 +35,63 @@ exports[`Table.FixedColumn renders correctly scrollX - with data 1`] = ` title1 title2 title3 title4 title5 title6 title7 title8 title9 title10 title11 title12 @@ -623,87 +599,63 @@ exports[`Table.FixedColumn renders correctly scrollX - without data 1`] = ` title1 title2 title3 title4 title5 title6 title7 title8 title9 title10 title11 title12 @@ -766,95 +718,69 @@ exports[`Table.FixedColumn renders correctly scrollXY - with data 1`] = ` title1 title2 title3 title4 title5 title6 title7 title8 title9 title10 title11 title12 @@ -1389,87 +1315,63 @@ exports[`Table.FixedColumn renders correctly scrollXY - without data 1`] = ` title1 title2 title3 title4 title5 title6 title7 title8 title9 title10 title11 title12 diff --git a/tests/__snapshots__/Table.spec.js.snap b/tests/__snapshots__/Table.spec.js.snap index 3b8049c42..71bc60211 100644 --- a/tests/__snapshots__/Table.spec.js.snap +++ b/tests/__snapshots__/Table.spec.js.snap @@ -22,9 +22,7 @@ exports[`Table.Basic custom components renders correctly 1`] = ` > Name @@ -88,35 +86,27 @@ exports[`Table.Basic custom components renders fixed column and header correctly > Name Age Gender @@ -189,7 +179,6 @@ exports[`Table.Basic renders colSpan correctly 1`] = ` Name @@ -243,8 +232,6 @@ exports[`Table.Basic renders correctly 1`] = ` Name @@ -293,15 +280,11 @@ exports[`Table.Basic renders rowSpan correctly 1`] = ` First Name Last Name @@ -355,7 +338,6 @@ exports[`Table.Basic syntactic sugar 1`] = ` total @@ -363,8 +345,6 @@ exports[`Table.Basic syntactic sugar 1`] = ` Name @@ -376,7 +356,6 @@ exports[`Table.Basic syntactic sugar 1`] = ` > No Data