feat: 버튼 컴포넌트 수정 액션에서 모달 제목/설명 전달
변경 사항: 1. InteractiveScreenViewer - handleEditAction 수정 ✅ - config에서 editModalTitle, editModalDescription 읽기 - openEditModal 이벤트로 제목/설명 전달 2. ButtonTypeConfig 타입 추가 ✅ - editModalTitle 필드 추가 - editModalDescription 필드 추가 3. ButtonConfigPanel 수정 ✅ - webTypeConfig에도 제목/설명 저장 - 이중 저장 (action + webTypeConfig) 결과: - ✅ 버튼의 수정 액션 실행 시 설정한 제목이 모달에 표시됨 - ✅ 버튼의 수정 액션 실행 시 설정한 설명이 모달에 표시됨 - ✅ EditModal이 openEditModal 이벤트에서 제목/설명 받음 - ✅ 전체 데이터 흐름 완성
This commit is contained in:
@@ -402,12 +402,15 @@ export const ButtonConfigPanel: React.FC<ButtonConfigPanelProps> = ({ component,
|
||||
id="edit-modal-title"
|
||||
placeholder="모달 제목을 입력하세요 (예: 데이터 수정)"
|
||||
value={config.action?.editModalTitle || ""}
|
||||
onChange={(e) =>
|
||||
onChange={(e) => {
|
||||
const newValue = e.target.value;
|
||||
onUpdateProperty("componentConfig.action", {
|
||||
...config.action,
|
||||
editModalTitle: e.target.value,
|
||||
})
|
||||
}
|
||||
editModalTitle: newValue,
|
||||
});
|
||||
// webTypeConfig에도 저장
|
||||
onUpdateProperty("webTypeConfig.editModalTitle", newValue);
|
||||
}}
|
||||
/>
|
||||
<p className="mt-1 text-xs text-gray-500">비워두면 기본 제목이 표시됩니다</p>
|
||||
</div>
|
||||
@@ -418,12 +421,15 @@ export const ButtonConfigPanel: React.FC<ButtonConfigPanelProps> = ({ component,
|
||||
id="edit-modal-description"
|
||||
placeholder="모달 설명을 입력하세요 (예: 선택한 데이터를 수정합니다)"
|
||||
value={config.action?.editModalDescription || ""}
|
||||
onChange={(e) =>
|
||||
onChange={(e) => {
|
||||
const newValue = e.target.value;
|
||||
onUpdateProperty("componentConfig.action", {
|
||||
...config.action,
|
||||
editModalDescription: e.target.value,
|
||||
})
|
||||
}
|
||||
editModalDescription: newValue,
|
||||
});
|
||||
// webTypeConfig에도 저장
|
||||
onUpdateProperty("webTypeConfig.editModalDescription", newValue);
|
||||
}}
|
||||
/>
|
||||
<p className="mt-1 text-xs text-gray-500">비워두면 설명이 표시되지 않습니다</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user