Skip to content

Commit

Permalink
fix: rowHierarchyType error
Browse files Browse the repository at this point in the history
  • Loading branch information
fangsmile committed Mar 18, 2024
1 parent 3946191 commit b423be5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vtable/src/layout/simple-header-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ export class SimpleHeaderLayoutMap implements LayoutMapAPI {
this._columns = [];
this._headerCellIds = [];
this.hierarchyIndent = hierarchyIndent ?? 20;
this.rowHierarchyType = checkHasTreeDefine(this) ? 'tree' : 'grid';

this.columnTree = new DimensionTree(columns as any, { seqId: 0 }); //seqId这里没有利用上 所有顺便传了0
this._headerObjects = this._addHeaders(0, columns, []);
this._headerObjectMap = this._headerObjects.reduce((o, e) => {
o[e.id as number] = e;
return o;
}, {} as { [key in LayoutObjectId]: HeaderData });
this.rowHierarchyType = checkHasTreeDefine(this) ? 'tree' : 'grid';
this._hasAggregation = checkHasAggregation(this);
this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this);
this._hasAggregationOnTopCount = checkHasAggregationOnTop(this);
Expand Down

0 comments on commit b423be5

Please sign in to comment.