diff --git a/common/changes/@visactor/vtable/fix-row-update-direction_2025-03-21-07-18.json b/common/changes/@visactor/vtable/fix-row-update-direction_2025-03-21-07-18.json new file mode 100644 index 0000000000..e0f790ed5e --- /dev/null +++ b/common/changes/@visactor/vtable/fix-row-update-direction_2025-03-21-07-18.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vtable", + "comment": "fix: fix row update range #3468", + "type": "none" + } + ], + "packageName": "@visactor/vtable" +} \ No newline at end of file diff --git a/packages/vtable/src/scenegraph/layout/update-row.ts b/packages/vtable/src/scenegraph/layout/update-row.ts index 137342bded..92ff9c7d9e 100644 --- a/packages/vtable/src/scenegraph/layout/update-row.ts +++ b/packages/vtable/src/scenegraph/layout/update-row.ts @@ -151,12 +151,9 @@ export function updateRow( const minRow = Math.min(...addRows); scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos); } - // if (addRows.length > removeRows.length) { - scene.proxy.rowUpdateDirection = 'down'; - // } else { - // scene.proxy.rowUpdateDirection = 'up'; - // } - console.log('rowUpdateDirection', scene.proxy.rowUpdateDirection); + // 对于列表,折叠展开时最上行(按钮行行)位置不变,为基准向下更新,所以这里配置方向为up(从上向下更新) + // 对于透视表,最上行以上以下都也可能会变,目前采区重新建立场景树方案 + scene.proxy.rowUpdateDirection = 'up'; scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2); updateBottomFrozeCellGroups(); // scene.proxy.progress();