260515_01_ENH: 클라이언트 수정사항 반영 및 다른 조사들 data 연결

This commit is contained in:
2026-05-15 14:36:58 +09:00
parent fcca4a0be7
commit b041a25e47
39 changed files with 1819 additions and 941 deletions

View File

@@ -8,6 +8,7 @@ import {
appendCellMarker,
getColumnAlign,
getLeafColumns,
toCssSize,
toRoundedNumber,
toTableCellContent,
} from "./core/table-core.helpers";
@@ -29,6 +30,7 @@ export type PreAppendTableCell =
className?: string;
colSpan?: number;
rowSpan?: number;
width?: number | string;
};
type Props<T extends Record<string, unknown>> = {
@@ -66,6 +68,7 @@ const renderPreAppendCell = (cell: PreAppendTableCell, index: number) => {
className={cell.className}
colSpan={cell.colSpan}
rowSpan={cell.rowSpan}
style={cell.width === undefined ? undefined : { width: toCssSize(cell.width), minWidth: toCssSize(cell.width) }}
>
{cell.content}
</td>
@@ -128,15 +131,16 @@ export default function BaseDataTable<T extends Record<string, unknown>>({
const rawValue = row[column.key];
const align = getColumnAlign(column);
const defaultContent = column.render ? column.render(row) : toTableCellContent(rawValue);
const defaultContent = column.render ? column.render(row) : toTableCellContent(rawValue, column.decimalPlaces);
const numericValue = "numeric" in column && column.numeric ? parseNumber(rawValue ?? defaultContent) ?? 0 : 0;
if (column.rowHead) {
const rowHeaderClassName = row.headerClassName ?? "";
return (
<th
key={String(column.key)}
scope="row"
className={cn("lg-table__rowhead", column.cellClassName, dynamicCellClassName, fillGapClass)}
className={cn("kfpa-table__rowhead", column.cellClassName, rowHeaderClassName, dynamicCellClassName, fillGapClass)}
style={{ textAlign: align }}
>
{defaultContent}