Skip to content

Commit

Permalink
Refine appearance of DataTable loading state
Browse files Browse the repository at this point in the history
 - Make the loading spinner smaller
 - Use `TableRow`/`TableCell` to render the spinner's container. This aligns the
   styling more closely with that of the first row when populated.
  • Loading branch information
robertknight committed Nov 29, 2024
1 parent 6964775 commit 293dd0c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/data/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,15 @@ export default function DataTable<Row>({
<TableBody>
{!loading && tableRows}
{noContent && (
<tr>
<td colSpan={columns.length} className="text-center p-3">
<TableRow>
<TableCell colSpan={columns.length} classes="text-center p-3">
{loading ? (
<SpinnerSpokesIcon className="inline w-4em h-4em" />
<SpinnerSpokesIcon className="inline w-2em h-2em" />
) : (
<>{emptyMessage}</>
)}
</td>
</tr>
</TableCell>
</TableRow>
)}
</TableBody>
{children}
Expand Down

0 comments on commit 293dd0c

Please sign in to comment.