feature/v2-unified-renewal #379
|
|
@ -477,7 +477,36 @@ export const UnifiedRepeaterConfigPanel: React.FC<UnifiedRepeaterConfigPanelProp
|
||||||
{/* 렌더링 모드 */}
|
{/* 렌더링 모드 */}
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label className="text-xs font-medium">렌더링 모드</Label>
|
<Label className="text-xs font-medium">렌더링 모드</Label>
|
||||||
<Select value={config.renderMode} onValueChange={(value) => updateConfig({ renderMode: value as any })}>
|
<Select
|
||||||
|
value={config.renderMode}
|
||||||
|
onValueChange={(value) => {
|
||||||
|
const newMode = value as any;
|
||||||
|
const currentMode = config.renderMode;
|
||||||
|
|
||||||
|
// 모달 → 인라인 모드로 변경 시: isSourceDisplay 컬럼 제거 및 모달 설정 초기화
|
||||||
|
if (currentMode === "modal" && newMode === "inline") {
|
||||||
|
const filteredColumns = config.columns.filter((col) => !col.isSourceDisplay);
|
||||||
|
updateConfig({
|
||||||
|
renderMode: newMode,
|
||||||
|
columns: filteredColumns,
|
||||||
|
dataSource: {
|
||||||
|
...config.dataSource,
|
||||||
|
sourceTable: undefined,
|
||||||
|
foreignKey: undefined,
|
||||||
|
referenceKey: undefined,
|
||||||
|
displayColumn: undefined,
|
||||||
|
},
|
||||||
|
modal: {
|
||||||
|
...config.modal,
|
||||||
|
searchFields: [],
|
||||||
|
sourceDisplayColumns: [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
updateConfig({ renderMode: newMode });
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<SelectTrigger className="h-8 text-xs">
|
<SelectTrigger className="h-8 text-xs">
|
||||||
<SelectValue placeholder="모드 선택" />
|
<SelectValue placeholder="모드 선택" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue