From 37c2901976a0fd6494a3a814749cc3b161a25d3e Mon Sep 17 00:00:00 2001 From: leedj312 Date: Fri, 7 Mar 2025 13:03:09 +0900 Subject: [PATCH] =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20=ED=83=80?= =?UTF-8?q?=EC=9D=B4=ED=8B=80=20=EB=85=B8=EB=93=9C=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20headlist=20=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/table/index.tsx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 17360af12..8f1e0761d 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -3,22 +3,26 @@ import UiPageNations from "./uiPageNations"; interface UiTableProps { - headName: string; - publicReuseFacility: any[]; - headlist: { id: string; title: string; }[]; + headName: React.ReactNode|undefined; + publicReuseFacility: { [key: string]: string | number | boolean }[]; + headlist: UiHeadProps[]; pageSize: number; total: number; children: React.ReactNode|undefined; } -export function UiTable(UiTableProps: UiTableProps) { - const { publicReuseFacility, headlist,pageSize , total, children,headName} = UiTableProps; - const cur = 1; +interface UiHeadProps{ + id:string; + title:string; + +} +export function UiTable({ publicReuseFacility, headlist,pageSize , total, children,headName}: UiTableProps) { + const cur = 1; return ( <> -

{headName}

+ {headName?headName:<>} {children? <>{children}: @@ -29,7 +33,7 @@ export function UiTable(UiTableProps: UiTableProps) { - {publicReuseFacility.map((el: any,index) => ( + {publicReuseFacility.map((el: { [key: string]: string | number | boolean },index) => ( {headlist.map((head) => ( {el[head.id]}