Skip to content

Commit

Permalink
fix(table): hide empty content if isLoading is true (#2470)
Browse files Browse the repository at this point in the history
Avoid displaying loadingContent and emptyContent at the same time.
Note that there's an existing issue with loadingContent where if
emptyContent is not provided, it will render loadingContent on top of
the columns (instead of inside the table). This change doesn't fix that,
but rather make isLoading play nice with a provided emptyContent. A
separate fix is still needed for when emptyContent is not provided, which
may affect this change later.
  • Loading branch information
brunokc committed Mar 10, 2024
1 parent 2894aec commit ad15d05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/table/src/table-body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const TableBody = forwardRef<"tbody", TableBodyProps>((props, ref) => {
colSpan={collection.columnCount}
role="gridcell"
>
{bodyProps.emptyContent}
{!isLoading && bodyProps.emptyContent}
</td>
</tr>
);
Expand Down

0 comments on commit ad15d05

Please sign in to comment.