Skip to content

Commit

Permalink
fix(table): add empty content only when table size is 0 #2742
Browse files Browse the repository at this point in the history
  • Loading branch information
shrinidhi.upadhyaya committed Apr 16, 2024
1 parent 158c2aa commit 7d91869
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/components/table/src/table-body.tsx
Expand Up @@ -121,7 +121,9 @@ const TableBody = forwardRef<"tbody", TableBodyProps>((props, ref) => {
>
{bodyProps.loadingContent}
</td>
{!emptyContent && <td className={slots?.emptyWrapper({class: classNames?.emptyWrapper})} />}
{!emptyContent && collection.size === 0 ? (
<td className={slots?.emptyWrapper({class: classNames?.emptyWrapper})} />
) : null}
</tr>
);
}
Expand Down

0 comments on commit 7d91869

Please sign in to comment.