Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: when no rowTree treeMode occor error #3830\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
6 changes: 3 additions & 3 deletions packages/vtable/src/layout/pivot-header-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1639,10 +1639,10 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
if (this.rowHierarchyType === 'tree') {
const extensionRowCount = this.extensionRows?.length ?? 0;
if (this.rowHeaderTitle) {
this.rowHeaderLevelCount = 2 + extensionRowCount;
this.rowHeaderLevelCount = 1 + (this.rowDimensionTree.totalLevel ? 1 : 0) + extensionRowCount;
return;
}
this.rowHeaderLevelCount = 1 + extensionRowCount;
this.rowHeaderLevelCount = (this.rowDimensionTree.totalLevel ? 1 : 0) + extensionRowCount;
return;
}
const rowLevelCount = this._getRowHeaderTreeExpandedMaxLevelCount();
Expand Down Expand Up @@ -2212,7 +2212,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
const row_pathIds = this._rowHeaderCellFullPathIds[recordRow]; //获取当前行的cellId 但这个cellId不是各级维度都有的 下面逻辑就是找全路径然后再去各个树找path的过程
let findTree = this.rowDimensionTree; //第一棵寻找的树是第一列的维度树 主树
let level = 0; //level和col对应,代表一层层树找的过程
while (findTree) {
while (findTree && row_pathIds) {
const pathIds: (number | string)[] = []; // pathIds记录寻找当前树需要匹配的cellId
let cellId: LayoutObjectId = row_pathIds[level]; //row_pathIds中每个值对应了pathIds的一个节点cellId
pathIds.push(cellId);
Expand Down
Loading