지표탭 추가 수정
This commit is contained in:
@@ -50,7 +50,7 @@ import {
|
||||
mergeIndicators,
|
||||
reorderIndicatorGroup,
|
||||
splitIndicatorPane,
|
||||
buildIndicatorConfigsFromTypes,
|
||||
replaceIndicatorConfigsFromTypes,
|
||||
} from './utils/indicatorPaneMerge';
|
||||
import { useAppSettings } from './hooks/useAppSettings';
|
||||
import { clampVirtualTargetMax } from './utils/virtualTargetLimits';
|
||||
@@ -1368,7 +1368,7 @@ function App() {
|
||||
});
|
||||
}, [layoutDef.count, activeSlot, getParams, getVisualConfig]);
|
||||
|
||||
/** 지표 추가 팝업 — 탭 전체 추가 (한 번에 상태 반영) */
|
||||
/** 지표 추가 팝업 — 탭 전체 추가 (기존 보조지표 제거 후 탭 지표만 적용) */
|
||||
const handleAddIndicators = useCallback((types: string[]) => {
|
||||
if (!types.length) return;
|
||||
if (layoutDef.count > 1) {
|
||||
@@ -1378,10 +1378,9 @@ function App() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
setIndicators(prev => {
|
||||
const added = buildIndicatorConfigsFromTypes(types, prev, getParams, getVisualConfig, newIndId);
|
||||
return added.length > 0 ? [...prev, ...added] : prev;
|
||||
});
|
||||
setIndicators(
|
||||
replaceIndicatorConfigsFromTypes(types, getParams, getVisualConfig, newIndId),
|
||||
);
|
||||
}, [layoutDef.count, activeSlot, getParams, getVisualConfig]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user