feat(universal-form-modal): 필수 필드 검증 및 섹션 레이아웃 열 수 설정 기능 추가
- validateRequiredFields 함수 추가로 필수 필드 미입력 시 저장 차단 - 섹션별 열 수 설정 (1열/2열/3열/4열) 및 gridSpan 자동 계산 - 버튼 이벤트 버블링 방지 (type=button, preventDefault, stopPropagation) - onChange 콜백 렌더링 사이클 분리 (setTimeout) - 다중 행 저장 시 빈 객체 건너뛰기 로직 추가
This commit is contained in:
@@ -670,6 +670,25 @@ export function UniversalFormModalConfigPanel({ config, onChange }: UniversalFor
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label className="text-[10px]">열 수 (레이아웃)</Label>
|
||||
<Select
|
||||
value={String(selectedSection.columns || 2)}
|
||||
onValueChange={(value) => updateSection(selectedSection.id, { columns: parseInt(value) })}
|
||||
>
|
||||
<SelectTrigger className="h-7 text-xs mt-1">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="1">1열 (세로 배치)</SelectItem>
|
||||
<SelectItem value="2">2열 (기본)</SelectItem>
|
||||
<SelectItem value="3">3열</SelectItem>
|
||||
<SelectItem value="4">4열</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<HelpText>필드들을 몇 열로 배치할지 설정합니다.</HelpText>
|
||||
</div>
|
||||
|
||||
<div className="border rounded-md p-2 space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-[10px] font-medium">반복 섹션</span>
|
||||
|
||||
Reference in New Issue
Block a user