화면 분할 패널 기능
This commit is contained in:
@@ -40,6 +40,21 @@ export function ScreenSplitPanelConfigPanel({ config = {}, onChange }: ScreenSpl
|
||||
...config,
|
||||
});
|
||||
|
||||
// config prop이 변경되면 localConfig 동기화
|
||||
useEffect(() => {
|
||||
console.log("🔄 [ScreenSplitPanelConfigPanel] config prop 변경 감지:", config);
|
||||
setLocalConfig({
|
||||
screenId: config.screenId || 0,
|
||||
leftScreenId: config.leftScreenId || 0,
|
||||
rightScreenId: config.rightScreenId || 0,
|
||||
splitRatio: config.splitRatio || 50,
|
||||
resizable: config.resizable ?? true,
|
||||
buttonLabel: config.buttonLabel || "데이터 전달",
|
||||
buttonPosition: config.buttonPosition || "center",
|
||||
...config,
|
||||
});
|
||||
}, [config]);
|
||||
|
||||
// 화면 목록 로드
|
||||
useEffect(() => {
|
||||
const loadScreens = async () => {
|
||||
@@ -66,6 +81,13 @@ export function ScreenSplitPanelConfigPanel({ config = {}, onChange }: ScreenSpl
|
||||
};
|
||||
setLocalConfig(newConfig);
|
||||
|
||||
console.log("📝 [ScreenSplitPanelConfigPanel] 설정 변경:", {
|
||||
key,
|
||||
value,
|
||||
newConfig,
|
||||
hasOnChange: !!onChange,
|
||||
});
|
||||
|
||||
// 변경 즉시 부모에게 전달
|
||||
if (onChange) {
|
||||
onChange(newConfig);
|
||||
|
||||
Reference in New Issue
Block a user