From 1d4da4caf521b1d6771a7f78e5f491cc878817bf Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Fri, 9 May 2025 16:55:09 +0900 Subject: [PATCH] =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20boldArray=20prope?= =?UTF-8?q?rty=20=EC=B6=94=EA=B0=80=20(=EC=97=AD=ED=95=A0=20:=20=EC=A7=80?= =?UTF-8?q?=EC=A0=95=EB=90=9C=20array=EC=9D=98=20=EA=B8=80=EC=94=A8?= =?UTF-8?q?=EC=83=89=20=EA=B5=B5=EA=B2=8C=20=EB=B3=80=EA=B2=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/table/index.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 00fc376e6..f02c1d3ac 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -14,6 +14,7 @@ type UiTableProps = { className?: string; resetPageNo?: boolean; children?: React.ReactNode | undefined; + boldArray?: number[]; } type UiHeadProps = { @@ -23,7 +24,7 @@ type UiHeadProps = { visible?:boolean; } -export function UiTable({ tableData, headlist, pageSize, total, headName, children, cellClick, onPageChange, className = '', resetPageNo = false }: UiTableProps) { +export function UiTable({ tableData, headlist, pageSize, total, headName, children, cellClick, onPageChange, className = '', resetPageNo = false, boldArray = [] }: UiTableProps) { const [cur, setCur] = useState(1); const [idx, setIdx] = useState(-1); @@ -63,6 +64,16 @@ export function UiTable({ tableData, headlist, pageSize, total, headName, childr .filter((item) => item.visible != false) .map((head) => ( head.id && head.id.length > 1 && ( + boldArray.includes(index) ? handleCellClick(index, head.id)} + key={`cell-${head.id}-${index}`} + > + {typeof el[head.id] === 'number' ? String(el[head.id]).replace(/\B(?=(\d{3})+(?!\d))/g, ",") : String(el[head.id] ?? '')} + :