feat: Update SplitPanelLayoutComponent to manage custom left selected data

- Initialized custom left selected data to an empty object when deselecting an item, ensuring a clean state for the right form.
- Passed the selected item to the custom left selected data when an item is selected, improving data handling in custom mode.
- Enhanced overall data management within the SplitPanelLayoutComponent for better user experience.
This commit is contained in:
kjs 2026-02-12 14:18:46 +09:00
parent 4473743d5f
commit 70cb50e446
1 changed files with 2 additions and 0 deletions

View File

@ -1564,6 +1564,7 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
if (isSameItem) {
// 선택 해제 → 전체 데이터 로드
setSelectedLeftItem(null);
setCustomLeftSelectedData({}); // 커스텀 모드 우측 폼 데이터 초기화
setExpandedRightItems(new Set());
setTabsData({});
if (activeTabIndex === 0) {
@ -1584,6 +1585,7 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
}
setSelectedLeftItem(item);
setCustomLeftSelectedData(item); // 커스텀 모드 우측 폼에 선택된 데이터 전달
setExpandedRightItems(new Set()); // 좌측 항목 변경 시 우측 확장 초기화
setTabsData({}); // 모든 탭 데이터 초기화