From 4e869b2c70780fe4d1f1d323c6185f08f0989282 Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Mon, 17 Mar 2025 17:45:57 +0900 Subject: [PATCH] =?UTF-8?q?TABLE=EC=97=90=EC=84=9C=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=ED=85=9C=20=EC=84=A0=ED=83=9D=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/business_components/src/ui/table/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index c96cabe7c..cbb37b273 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -1,7 +1,6 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@common/components"; import UiPageNations from "./uiPageNations"; - type UiTableProps = { headName: React.ReactNode | undefined; tableData: { [key: string]: string | number | boolean }[]; @@ -9,14 +8,15 @@ type UiTableProps = { pageSize: number; total: number; children: React.ReactNode | undefined; + cellClick : (index:number)=>void | undefined; } type UiHeadProps = { id: string; title: string; - } -export function UiTable({ tableData, headlist, pageSize, total, children, headName }: UiTableProps) { + +export function UiTable({ tableData, headlist, pageSize, total, children, headName, cellClick }: UiTableProps) { const cur = 1; return ( @@ -35,13 +35,11 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa {tableData?.map((el: { [key: string]: string | number | boolean }, index) => ( {headlist.map((head) => ( - {el[head.id]} + cellClick(index)} key={head.id + index}>{el[head.id]} ))} - ))} - {total <= 0 ? <> : }