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:
parent
43a394df31
commit
1064397be2
|
|
@ -720,7 +720,7 @@ export const V2Repeater: React.FC<V2RepeaterProps> = ({
|
|||
displayName: col.displayName || col.display_name || col.label || name,
|
||||
detailSettings: col.detailSettings || col.detail_settings,
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -792,6 +792,7 @@ export function RepeaterTable({
|
|||
{/* 컬럼명 - 선택된 옵션라벨 형식으로 표시 */}
|
||||
<span>
|
||||
{activeOption?.headerLabel || `${col.label} - ${activeOption?.label || ""}`}
|
||||
{col.required && <span className="text-destructive ml-1">*</span>}
|
||||
</span>
|
||||
<ChevronDown className="h-3 w-3 opacity-60" />
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue