Skip to content

Commit

Permalink
fix: tree indicator expand state error
Browse files Browse the repository at this point in the history
  • Loading branch information
fangsmile committed Jan 27, 2025
1 parent 40bcf6a commit ccae39f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/vtable/src/layout/tree-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ export class DimensionTree {
(children?.length >= 1 || children === true)
) {
//树形展示 有子节点 且下一层需要展开
if (children === true || !children[0]?.indicatorKey) {
if (!(children[0]?.indicatorKey && this.hierarchyType === 'grid-tree')) {
//平铺情况 指标已经是最后一层且已经显示了 不需要设置图标昨天
node.hierarchyState = HierarchyState.expand;
}
children?.length >= 1 &&
Expand All @@ -200,7 +201,9 @@ export class DimensionTree {
});
} else if (children?.length >= 1 || children === true) {
//树形展示 有子节点 且下一层不需要展开
if (children === true || !children[0]?.indicatorKey) {

if (!(children[0]?.indicatorKey && this.hierarchyType === 'grid-tree')) {
//平铺情况 指标已经是最后一层且已经显示了 不需要设置图标昨天
node.hierarchyState = HierarchyState.collapse;
}
children?.length >= 1 &&
Expand Down

0 comments on commit ccae39f

Please sign in to comment.