조건부 설정 구현

This commit is contained in:
kjs
2025-12-22 10:44:22 +09:00
parent a717f97b34
commit ac526c8578
8 changed files with 459 additions and 133 deletions

View File

@@ -148,6 +148,8 @@ export interface DynamicComponentRendererProps {
// 탭 관련 정보 (탭 내부의 컴포넌트에서 사용)
parentTabId?: string; // 부모 탭 ID
parentTabsComponentId?: string; // 부모 탭 컴포넌트 ID
// 🆕 조건부 비활성화 상태
conditionalDisabled?: boolean;
[key: string]: any;
}
@@ -183,7 +185,8 @@ export const DynamicComponentRenderer: React.FC<DynamicComponentRendererProps> =
label: (component as any).label,
required: (component as any).required,
readonly: (component as any).readonly,
disabled: (component as any).disabled || props.disabledFields?.includes(fieldName),
// conditionalDisabled가 true이면 비활성화
disabled: (component as any).disabled || props.disabledFields?.includes(fieldName) || props.conditionalDisabled,
value: currentValue,
onChange: handleChange,
tableName: (component as any).tableName || props.tableName,