fo: UiTable 수정
This commit is contained in:
@@ -43,6 +43,7 @@ type UiHeadProps = {
|
||||
row?: number;
|
||||
widthPercent?: number;
|
||||
rowSpan?: number;
|
||||
colSpan?: number;
|
||||
};
|
||||
|
||||
export function UiTable({
|
||||
@@ -136,13 +137,13 @@ export function UiTable({
|
||||
<></>
|
||||
)}
|
||||
<div className={`card !p-0r !m-[1.2rem] ${className}`}>
|
||||
<Table variant="secondary" className={widthFixed?"table-fixed":""}>
|
||||
{widthFixed?
|
||||
<colgroup>
|
||||
{leafCols.map(col => (
|
||||
<col key={col.id} style={{ width: col.widthPercent ? `${col.widthPercent}%` : undefined }} />
|
||||
))}
|
||||
</colgroup>:""}
|
||||
<Table variant="secondary" className={widthFixed ? "table-fixed" : ""}>
|
||||
{widthFixed ?
|
||||
<colgroup>
|
||||
{leafCols.map(col => (
|
||||
<col key={col.id} style={{ width: col.widthPercent ? `${col.widthPercent}%` : undefined }} />
|
||||
))}
|
||||
</colgroup> : ""}
|
||||
<TableHeader ref={headerRef} className="font-bold">
|
||||
{children ? children : <HeadMakeColSpan upHeadList={headlist} />}
|
||||
</TableHeader>
|
||||
@@ -261,7 +262,10 @@ export function UiTable({
|
||||
<TableRow>
|
||||
<TableCell
|
||||
colSpan={
|
||||
headlist.filter((item) => item.visible != false).length
|
||||
headlist.filter((item) => item.visible != false).length -
|
||||
headlist.filter(
|
||||
(item) => item.visible != false && item.colSpan,
|
||||
).length
|
||||
}
|
||||
className="h-24 text-center text-gray-500"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user