테이블 컬럼 중복 삽입 안되게 수정

This commit is contained in:
kjs
2025-10-23 10:07:55 +09:00
parent 0c3ce4d3eb
commit e934cc945b
3 changed files with 54 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ interface ComponentsPanelProps {
onSearchChange?: (value: string) => void;
onTableDragStart?: (e: React.DragEvent, table: TableInfo, column?: ColumnInfo) => void;
selectedTableName?: string;
placedColumns?: Set<string>; // 이미 배치된 컬럼명 집합
}
export function ComponentsPanel({
@@ -26,7 +27,8 @@ export function ComponentsPanel({
searchTerm = "",
onSearchChange,
onTableDragStart,
selectedTableName
selectedTableName,
placedColumns
}: ComponentsPanelProps) {
const [searchQuery, setSearchQuery] = useState("");
@@ -207,6 +209,7 @@ export function ComponentsPanel({
onSearchChange={onSearchChange || (() => {})}
onDragStart={onTableDragStart}
selectedTableName={selectedTableName}
placedColumns={placedColumns}
/>
) : (
<div className="flex h-32 items-center justify-center text-center">