Skip to content

Commit

Permalink
Fix: Table: Empty デザイン
Browse files Browse the repository at this point in the history
Closes #1551
  • Loading branch information
sweagent committed Apr 5, 2024
1 parent c4fe4ec commit 97bf725
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions packages/for-ui/src/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,21 +315,28 @@ export const Table = <T extends RowData>({
))}
</TableHead>
<TableBody>
{table.getRowModel().rows.map((row) => (
<RowComponent
key={row.id}
row={row}
selectable={selectable}
onClick={
(onSelectRow || onSelectRows || onRowClick) &&
((e, row) => {
selectRow(row);
onRowClick?.(e, row);
})
}
/>
))}
</TableBody>
{table.getRowModel().rows.length > 0 ? (
table.getRowModel().rows.map((row) => (
<RowComponent
key={row.id}
row={row}
selectable={selectable}
onClick={
(onSelectRow || onSelectRows || onRowClick) &&
((e, row) => {
selectRow(row);
onRowClick?.(e, row);
})
}
/>
))
) : (
<tr>
<td colSpan={passedColumns.length} style={{ textAlign: 'center' }}>
データがありません
</td>
</tr>
)}
</TableFrame>
{!disablePagination && (
<div className={fsx(`flex w-full justify-center`)}>
Expand Down

0 comments on commit 97bf725

Please sign in to comment.