Skip to content

Commit 13991fc

Browse files
authored
Merge pull request #3641 from VisActor/3640-bug-adaptive-heightmode
3640 bug adaptive heightmode
2 parents bb9931e + 5eea4fb commit 13991fc

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "fix: rowHeight error when set adaptive heightMode #3640\n\n",
5+
"type": "none",
6+
"packageName": "@visactor/vtable"
7+
}
8+
],
9+
"packageName": "@visactor/vtable",
10+
"email": "892739385@qq.com"
11+
}

packages/vtable/src/scenegraph/group-creater/progress/proxy.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ export class SceneProxy {
9595
if (this.table.options.maintainedColumnCount) {
9696
this.colLimit = this.table.options.maintainedColumnCount;
9797
}
98+
if (this.table.heightMode === 'adaptive') {
99+
this.rowLimit = this.table.rowCount;
100+
}
101+
if (this.table.widthMode === 'adaptive') {
102+
this.colLimit = this.table.colCount;
103+
}
98104
}
99105

100106
get bodyLeftCol(): number {
@@ -302,7 +308,9 @@ export class SceneProxy {
302308
createRowCellGroup(onceCount: number) {
303309
const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
304310
// compute rows height
305-
computeRowsHeight(this.table, this.currentRow + 1, endRow, false);
311+
if (this.table.heightMode !== 'adaptive') {
312+
computeRowsHeight(this.table, this.currentRow + 1, endRow, false);
313+
}
306314

307315
this.rowEnd = endRow;
308316

0 commit comments

Comments
 (0)