children 안 넣는 경우도 나오도록 수정.
This commit is contained in:
@@ -13,7 +13,7 @@ type UiTableProps = {
|
||||
onPageChange: (page: number) => void;
|
||||
className?: string;
|
||||
resetPageNo?: boolean;
|
||||
children: React.ReactNode | undefined;
|
||||
children?: React.ReactNode | undefined;
|
||||
}
|
||||
|
||||
type UiHeadProps = {
|
||||
@@ -52,9 +52,12 @@ export function UiTable({ tableData, headlist, pageSize, total, headName, childr
|
||||
</div> : <></>}
|
||||
<div className={`card !m-[1.2rem] !p-0r ${className}`}>
|
||||
<Table variant="secondary">
|
||||
{children?children:
|
||||
<TableHeader className="font-bold">
|
||||
{children ? children : <HeadMakeColSpan upHeadList={headlist} />}
|
||||
</TableHeader>
|
||||
}
|
||||
|
||||
<TableBody className='text-center'>
|
||||
{tableData.length > 0 ? tableData?.map((el: { [key: string]: any}, index) => (
|
||||
<TableRow key={`row-${index}`}>
|
||||
|
||||
Reference in New Issue
Block a user