Fix modal label display issues and DOM node removal errors

- Hide rounded background labels in modal (계약구분, 국내/해외, 기본 버튼)
- Add try-catch blocks for DOM operations to prevent removeChild errors
- Fix event listener registration/removal in RealtimePreview, FileUpload, FileComponentConfigPanel
- Improve error handling for CustomEvent dispatching
This commit is contained in:
leeheejin
2025-09-29 19:32:20 +09:00
parent d0d37d9e29
commit 0b787b4c4c
7 changed files with 142 additions and 112 deletions

View File

@@ -1726,19 +1726,19 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
return (
<>
<div className="h-full w-full rounded-xl border border-gray-200/60 bg-gradient-to-br from-white to-gray-50/30 p-4 shadow-sm transition-all duration-200 hover:shadow-md">
{/* 라벨이 있는 경우 표시 (데이터 테이블 제외) */}
{shouldShowLabel && (
<div className="block mb-3" style={labelStyle}>
<div className="inline-flex items-center bg-gray-100 px-3 py-1 rounded-lg text-sm font-semibold">
{labelText}
{component.required && <span style={{ color: "#f97316", marginLeft: "4px" }}>*</span>}
<div className="h-full w-full">
{/* 라벨이 있는 경우 표시 (데이터 테이블 제외) */}
{shouldShowLabel && (
<div className="block mb-3" style={labelStyle}>
<div className="inline-flex items-center bg-gray-100 px-3 py-1 rounded-lg text-sm font-semibold">
{labelText}
{component.required && <span style={{ color: "#f97316", marginLeft: "4px" }}>*</span>}
</div>
</div>
</div>
)}
)}
{/* 실제 위젯 */}
<div className="flex-1 rounded-lg overflow-hidden">{renderInteractiveWidget(component)}</div>
<div className="h-full w-full">{renderInteractiveWidget(component)}</div>
</div>
{/* 개선된 검증 패널 (선택적 표시) */}