From 465395c1629fb742d269b77f370e2a45e91a6677 Mon Sep 17 00:00:00 2001 From: DDD1542 Date: Thu, 12 Mar 2026 03:45:41 +0900 Subject: [PATCH] [agent-pipeline] pipe-20260311182531-f443 round-4 --- .../V2ItemRoutingConfigPanel.tsx | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/frontend/components/v2/config-panels/V2ItemRoutingConfigPanel.tsx b/frontend/components/v2/config-panels/V2ItemRoutingConfigPanel.tsx index f7855440..0ec5a29f 100644 --- a/frontend/components/v2/config-panels/V2ItemRoutingConfigPanel.tsx +++ b/frontend/components/v2/config-panels/V2ItemRoutingConfigPanel.tsx @@ -292,16 +292,34 @@ export const V2ItemRoutingConfigPanel: React.FC = loadTables(); }, []); + const dispatchConfigEvent = (newConfig: Partial) => { + if (typeof window !== "undefined") { + window.dispatchEvent( + new CustomEvent("componentConfigChanged", { + detail: { config: { ...config, ...newConfig } }, + }) + ); + } + }; + const update = (partial: Partial) => { - onChange({ ...configProp, ...partial }); + const merged = { ...configProp, ...partial }; + onChange(merged); + dispatchConfigEvent(partial); }; const updateDataSource = (field: string, value: string) => { - update({ dataSource: { ...config.dataSource, [field]: value } }); + const newDataSource = { ...config.dataSource, [field]: value }; + const partial = { dataSource: newDataSource }; + onChange({ ...configProp, ...partial }); + dispatchConfigEvent(partial); }; const updateModals = (field: string, value?: number) => { - update({ modals: { ...config.modals, [field]: value } }); + const newModals = { ...config.modals, [field]: value }; + const partial = { modals: newModals }; + onChange({ ...configProp, ...partial }); + dispatchConfigEvent(partial); }; // 공정 컬럼 관리