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

@@ -532,19 +532,11 @@ export const InteractiveScreenViewerDynamic: React.FC<InteractiveScreenViewerPro
return (
<>
<div className="absolute" style={componentStyle}>
<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">
{/* 라벨 표시 - 컴포넌트 내부에서 라벨을 처리하므로 외부에서는 표시하지 않음 */}
{!hideLabel && component.label && component.style?.labelDisplay === false && (
<div className="mb-3">
<div className="inline-flex items-center bg-gray-100 px-3 py-1 rounded-lg text-sm font-semibold text-gray-700">
{component.label}
{(component as WidgetComponent).required && <span className="ml-1 text-orange-500">*</span>}
</div>
</div>
)}
<div className="h-full w-full">
{/* 라벨 숨김 - 모달에서 라벨을 표시하지 않음 */}
{/* 위젯 렌더링 */}
<div className="flex-1 rounded-lg overflow-hidden">{renderInteractiveWidget(component)}</div>
<div className="h-full w-full">{renderInteractiveWidget(component)}</div>
</div>
</div>