Skip to content

Commit 9e87b99

Browse files
yykoypjyangpj17
andauthored
fix: render empty node after get container size (#813)
Co-authored-by: yangpj17 <[email protected]>
1 parent f2cc27d commit 9e87b99

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/Body/ExpandedRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function ExpandedRow({
4444
}}
4545
className={`${prefixCls}-expanded-row-fixed`}
4646
>
47-
{contentNode}
47+
{componentWidth !== 0 && contentNode}
4848
</div>
4949
);
5050
}

tests/__snapshots__/FixedColumn.spec.js.snap

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,9 +1760,7 @@ exports[`Table.FixedColumn renders correctly scrollX - without data 1`] = `
17601760
<div
17611761
class="rc-table-expanded-row-fixed"
17621762
style="width: 0px; position: sticky; left: 0px; overflow: hidden;"
1763-
>
1764-
No Data
1765-
</div>
1763+
/>
17661764
</td>
17671765
</tr>
17681766
</tbody>
@@ -2892,9 +2890,7 @@ exports[`Table.FixedColumn renders correctly scrollXY - without data 1`] = `
28922890
<div
28932891
class="rc-table-expanded-row-fixed"
28942892
style="width: -15px; position: sticky; left: 0px; overflow: hidden;"
2895-
>
2896-
No Data
2897-
</div>
2893+
/>
28982894
</td>
28992895
</tr>
29002896
</tbody>

0 commit comments

Comments
 (0)