childeren 복구
This commit is contained in:
@@ -13,6 +13,7 @@ type UiTableProps = {
|
||||
onPageChange: (page: number) => void;
|
||||
className?: string;
|
||||
resetPageNo?: boolean;
|
||||
children: React.ReactNode | undefined;
|
||||
}
|
||||
|
||||
type UiHeadProps = {
|
||||
@@ -21,7 +22,7 @@ type UiHeadProps = {
|
||||
align?: string;
|
||||
}
|
||||
|
||||
export function UiTable({ tableData, headlist, pageSize, total, headName, cellClick, onPageChange, className = '', resetPageNo = false }: UiTableProps) {
|
||||
export function UiTable({ tableData, headlist, pageSize, total, headName, children, cellClick, onPageChange, className = '', resetPageNo = false }: UiTableProps) {
|
||||
const [cur, setCur] = useState<number>(1);
|
||||
const [idx, setIdx] = useState<number>(-1);
|
||||
|
||||
@@ -52,7 +53,7 @@ export function UiTable({ tableData, headlist, pageSize, total, headName, cellCl
|
||||
<div className={`card !m-[1.2rem] !p-0r ${className}`}>
|
||||
<Table variant="secondary">
|
||||
<TableHeader className="font-bold">
|
||||
<HeadMakeColSpan upHeadList={headlist} />
|
||||
{children ? children : <HeadMakeColSpan upHeadList={headlist} />}
|
||||
</TableHeader>
|
||||
<TableBody className='text-center'>
|
||||
{tableData.length > 0 ? tableData?.map((el: { [key: string]: any}, index) => (
|
||||
|
||||
Reference in New Issue
Block a user