From 97bf72507dd8f7070c9ca9be0be5abad9fe27496 Mon Sep 17 00:00:00 2001 From: sweagent Date: Fri, 5 Apr 2024 19:58:05 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Table:=20Empty=20=E3=83=87=E3=82=B6?= =?UTF-8?q?=E3=82=A4=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #1551 --- packages/for-ui/src/table/Table.tsx | 37 +++++++++++++++++------------ 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/packages/for-ui/src/table/Table.tsx b/packages/for-ui/src/table/Table.tsx index 2adcb2bb2..b2235ab4f 100644 --- a/packages/for-ui/src/table/Table.tsx +++ b/packages/for-ui/src/table/Table.tsx @@ -315,21 +315,28 @@ export const Table = ({ ))} - {table.getRowModel().rows.map((row) => ( - { - selectRow(row); - onRowClick?.(e, row); - }) - } - /> - ))} - + {table.getRowModel().rows.length > 0 ? ( + table.getRowModel().rows.map((row) => ( + { + selectRow(row); + onRowClick?.(e, row); + }) + } + /> + )) + ) : ( + + + データがありません + + + )} {!disablePagination && (