카드디스플레이 설정 적용안된느 오류 해결
This commit is contained in:
parent
b4a1fe6889
commit
9dbb6b100a
|
|
@ -57,24 +57,23 @@ export const UnifiedList = forwardRef<HTMLDivElement, UnifiedListProps>((props,
|
||||||
columns: tableColumns,
|
columns: tableColumns,
|
||||||
displayMode: config.viewMode === "card" ? "card" : "table",
|
displayMode: config.viewMode === "card" ? "card" : "table",
|
||||||
cardConfig: {
|
cardConfig: {
|
||||||
idColumn: tableColumns[0]?.columnName || "id",
|
idColumn: config.cardConfig?.titleColumn || tableColumns[0]?.columnName || "id",
|
||||||
titleColumn: tableColumns[0]?.columnName || "",
|
titleColumn: config.cardConfig?.titleColumn || tableColumns[0]?.columnName || "",
|
||||||
subtitleColumn: undefined,
|
subtitleColumn: config.cardConfig?.subtitleColumn || undefined,
|
||||||
descriptionColumn: undefined,
|
descriptionColumn: config.cardConfig?.descriptionColumn || undefined,
|
||||||
imageColumn: undefined,
|
imageColumn: config.cardConfig?.imageColumn || undefined,
|
||||||
cardsPerRow: 3,
|
cardsPerRow: config.cardConfig?.cardsPerRow || 3,
|
||||||
cardSpacing: 16,
|
cardSpacing: 16,
|
||||||
showActions: false,
|
showActions: false,
|
||||||
...config.cardConfig,
|
|
||||||
},
|
},
|
||||||
showHeader: true,
|
showHeader: config.viewMode !== "card", // 카드 모드에서는 테이블 헤더 숨김
|
||||||
showFooter: false,
|
showFooter: false,
|
||||||
checkbox: {
|
checkbox: {
|
||||||
enabled: !!onRowSelect,
|
enabled: !!onRowSelect,
|
||||||
position: "left" as const,
|
position: "left" as const,
|
||||||
showHeader: true,
|
showHeader: true,
|
||||||
},
|
},
|
||||||
height: "fixed" as const,
|
height: "auto" as const, // auto로 변경하여 스크롤 가능하게
|
||||||
autoWidth: true,
|
autoWidth: true,
|
||||||
stickyHeader: true,
|
stickyHeader: true,
|
||||||
autoLoad: true,
|
autoLoad: true,
|
||||||
|
|
@ -91,7 +90,7 @@ export const UnifiedList = forwardRef<HTMLDivElement, UnifiedListProps>((props,
|
||||||
pageSizeOptions: [5, 10, 20, 50, 100],
|
pageSizeOptions: [5, 10, 20, 50, 100],
|
||||||
},
|
},
|
||||||
filter: {
|
filter: {
|
||||||
enabled: config.searchable !== false,
|
enabled: false, // 필터 비활성화 (필요시 활성화)
|
||||||
position: "top" as const,
|
position: "top" as const,
|
||||||
searchPlaceholder: "검색...",
|
searchPlaceholder: "검색...",
|
||||||
},
|
},
|
||||||
|
|
@ -147,7 +146,7 @@ export const UnifiedList = forwardRef<HTMLDivElement, UnifiedListProps>((props,
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
id={id}
|
id={id}
|
||||||
className="flex flex-col overflow-hidden"
|
className="flex flex-col overflow-auto"
|
||||||
style={{
|
style={{
|
||||||
width: size?.width || style?.width || "100%",
|
width: size?.width || style?.width || "100%",
|
||||||
height: size?.height || style?.height || 400,
|
height: size?.height || style?.height || 400,
|
||||||
|
|
@ -158,10 +157,9 @@ export const UnifiedList = forwardRef<HTMLDivElement, UnifiedListProps>((props,
|
||||||
tableName={tableName}
|
tableName={tableName}
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
minHeight: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
overflow: "hidden",
|
|
||||||
}}
|
}}
|
||||||
onSelectedRowsChange={
|
onSelectedRowsChange={
|
||||||
onRowSelect
|
onRowSelect
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ export const CardModeRenderer: React.FC<CardModeRendererProps> = ({
|
||||||
gridTemplateColumns: `repeat(${config.cardsPerRow}, 1fr)`,
|
gridTemplateColumns: `repeat(${config.cardsPerRow}, 1fr)`,
|
||||||
gap: `${config.cardSpacing}px`,
|
gap: `${config.cardSpacing}px`,
|
||||||
padding: `${config.cardSpacing}px`,
|
padding: `${config.cardSpacing}px`,
|
||||||
|
overflow: "auto",
|
||||||
};
|
};
|
||||||
|
|
||||||
// 카드 높이 스타일
|
// 카드 높이 스타일
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue