fix: update required field handling in V2Repeater and RepeaterTable components

- Modified the logic in the V2Repeater component to determine required fields based on the isNullable property, enhancing validation accuracy.
- Updated the RepeaterTable component to visually indicate required fields with an asterisk, improving user awareness during data entry.

These changes aim to enhance data validation and user experience by ensuring that required fields are clearly marked and accurately validated.
This commit is contained in:
kjs 2026-03-19 09:47:15 +09:00
parent 43a394df31
commit 1064397be2
2 changed files with 2 additions and 1 deletions

View File

@ -720,7 +720,7 @@ export const V2Repeater: React.FC<V2RepeaterProps> = ({
displayName: col.displayName || col.display_name || col.label || name, displayName: col.displayName || col.display_name || col.label || name,
detailSettings: col.detailSettings || col.detail_settings, detailSettings: col.detailSettings || col.detail_settings,
categoryRef: typeInfo?.categoryRef || null, categoryRef: typeInfo?.categoryRef || null,
isRequired: col.isRequired || col.is_required || col.notNull || col.not_null === true || col.not_null === 'Y' || col.not_null === 'y', isRequired: col.isNullable === 'NO' || col.is_nullable === 'NO' || col.isRequired || col.is_required || col.notNull || col.not_null === true || col.not_null === 'Y' || col.not_null === 'y',
}; };
}); });
setCurrentTableColumnInfo(columnMap); setCurrentTableColumnInfo(columnMap);

View File

@ -792,6 +792,7 @@ export function RepeaterTable({
{/* 컬럼명 - 선택된 옵션라벨 형식으로 표시 */} {/* 컬럼명 - 선택된 옵션라벨 형식으로 표시 */}
<span> <span>
{activeOption?.headerLabel || `${col.label} - ${activeOption?.label || ""}`} {activeOption?.headerLabel || `${col.label} - ${activeOption?.label || ""}`}
{col.required && <span className="text-destructive ml-1">*</span>}
</span> </span>
<ChevronDown className="h-3 w-3 opacity-60" /> <ChevronDown className="h-3 w-3 opacity-60" />
</button> </button>