반복 데이터 입력컴포넌트 통합중
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
UnifiedBiz,
|
||||
UnifiedHierarchy,
|
||||
} from "@/components/unified";
|
||||
import { UnifiedRepeater } from "@/components/unified/UnifiedRepeater";
|
||||
|
||||
// 컴포넌트 렌더러 인터페이스
|
||||
export interface ComponentRenderer {
|
||||
@@ -392,6 +393,42 @@ export const DynamicComponentRenderer: React.FC<DynamicComponentRendererProps> =
|
||||
/>
|
||||
);
|
||||
|
||||
case "unified-repeater":
|
||||
return (
|
||||
<UnifiedRepeater
|
||||
config={{
|
||||
renderMode: config.renderMode || "inline",
|
||||
dataSource: config.dataSource || {
|
||||
tableName: "",
|
||||
foreignKey: "",
|
||||
referenceKey: "",
|
||||
},
|
||||
columns: config.columns || [],
|
||||
modal: config.modal,
|
||||
button: config.button,
|
||||
features: config.features || {
|
||||
showAddButton: true,
|
||||
showDeleteButton: true,
|
||||
inlineEdit: false,
|
||||
dragSort: false,
|
||||
showRowNumber: false,
|
||||
selectable: false,
|
||||
multiSelect: false,
|
||||
},
|
||||
}}
|
||||
parentId={props.formData?.[config.dataSource?.referenceKey] || props.formData?.id}
|
||||
onDataChange={(data) => {
|
||||
console.log("UnifiedRepeater data changed:", data);
|
||||
}}
|
||||
onRowClick={(row) => {
|
||||
console.log("UnifiedRepeater row clicked:", row);
|
||||
}}
|
||||
onButtonClick={(action, row, buttonConfig) => {
|
||||
console.log("UnifiedRepeater button clicked:", action, row, buttonConfig);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
default:
|
||||
return (
|
||||
<div className="flex h-full w-full items-center justify-center rounded border-2 border-dashed border-amber-300 bg-amber-50 p-4">
|
||||
|
||||
Reference in New Issue
Block a user