밑꺽쇠 수정했음!

This commit is contained in:
leeheejin
2026-01-21 16:40:37 +09:00
parent e6bb366ec7
commit 62a82b3bcf
4 changed files with 100 additions and 2 deletions

View File

@@ -129,6 +129,7 @@ function buildHeaderTree(
caption: key,
level: 0,
isExpanded: expandedPaths.has(pathKey),
hasChildren: remainingFields.length > 0, // 다음 레벨 필드가 있으면 자식 있음
path: path,
span: 1,
};
@@ -195,6 +196,7 @@ function buildChildNodes(
caption: key,
level: level,
isExpanded: expandedPaths.has(pathKey),
hasChildren: remainingFields.length > 0, // 다음 레벨 필드가 있으면 자식 있음
path: path,
span: 1,
};
@@ -238,7 +240,7 @@ function flattenRows(nodes: PivotHeaderNode[]): PivotFlatRow[] {
level: node.level,
caption: node.caption,
isExpanded: node.isExpanded,
hasChildren: !!(node.children && node.children.length > 0),
hasChildren: node.hasChildren, // 노드에서 직접 가져옴 (다음 레벨 필드 존재 여부 기준)
});
if (node.isExpanded && node.children) {