diff --git a/common/changes/@visactor/vtable/3640-bug-adaptive-heightmode_2025-03-26-09-15.json b/common/changes/@visactor/vtable/3640-bug-adaptive-heightmode_2025-03-26-09-15.json new file mode 100644 index 0000000000..fda9e63157 --- /dev/null +++ b/common/changes/@visactor/vtable/3640-bug-adaptive-heightmode_2025-03-26-09-15.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: rowHeight error when set adaptive heightMode #3640\n\n", + "type": "none", + "packageName": "@visactor/vtable" + } + ], + "packageName": "@visactor/vtable", + "email": "892739385@qq.com" +} \ No newline at end of file diff --git a/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts b/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts index c1751950b3..c39dc285e7 100644 --- a/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts +++ b/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts @@ -95,6 +95,12 @@ export class SceneProxy { if (this.table.options.maintainedColumnCount) { this.colLimit = this.table.options.maintainedColumnCount; } + if (this.table.heightMode === 'adaptive') { + this.rowLimit = this.table.rowCount; + } + if (this.table.widthMode === 'adaptive') { + this.colLimit = this.table.colCount; + } } get bodyLeftCol(): number { @@ -302,7 +308,9 @@ export class SceneProxy { createRowCellGroup(onceCount: number) { const endRow = Math.min(this.totalRow, this.currentRow + onceCount); // compute rows height - computeRowsHeight(this.table, this.currentRow + 1, endRow, false); + if (this.table.heightMode !== 'adaptive') { + computeRowsHeight(this.table, this.currentRow + 1, endRow, false); + } this.rowEnd = endRow;