diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 4f369dc59..c3f5f8a60 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -81,6 +81,8 @@ export function UiTable({ const handlePageChange = (page: number) => { setCur(page); onPageChange(page); + if (index == 0) + setIdx(0) }; const handleCellClick = (index: number, headId: string) => { @@ -90,6 +92,7 @@ export function UiTable({ } }; + return ( <> {headName ? ( @@ -116,14 +119,13 @@ export function UiTable({ head.id.length > 1 && (boldArray.includes(index) ? ( handleCellClick(index, head.id)} key={`cell-${head.id}-${index}`} > @@ -131,39 +133,38 @@ export function UiTable({ ? String(el[head.id] ?? "") : String(el[head.id]).includes(".") ? String(el[head.id]) - .split(".") - .map((part, index) => - index === 0 - ? part.replace( - /\B(?=(\d{3})+(?!\d))/g, - ",", - ) - : part, - ) - .join(".") + .split(".") + .map((part, index) => + index === 0 + ? part.replace( + /\B(?=(\d{3})+(?!\d))/g, + ",", + ) + : part, + ) + .join(".") : String(el[head.id] ?? "").replace( - /\B(?=(\d{3})+(?!\d))/g, - ",", - )} + /\B(?=(\d{3})+(?!\d))/g, + ",", + )} ) : ( handleCellClick(index, head.id)} key={`cell-${head.id}-${index}`} > { //체크박스 유형애서 readOnly가 필요한 경우를 위해서 ChkClass 를 사용해서 readOnly 처리함. typeof el[head.id] === "object" && - el[head.id] !== null && - "chk" in (el[head.id] as object) && - "readonly" in (el[head.id] as object) ? ( + el[head.id] !== null && + "chk" in (el[head.id] as object) && + "readonly" in (el[head.id] as object) ? ( index === 0 ? part.replace( - /\B(?=(\d{3})+(?!\d))/g, - ",", - ) + /\B(?=(\d{3})+(?!\d))/g, + ",", + ) : part, ) .join(".")