조건부 설정 구현
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user