x-extends / vxe-table

Vxe table 的表格组件
https://vxetable.cn
MIT License
7.62k stars 1.05k forks source link

Vxe-table Tree Data Virtual Scroll does not work when tree-config / transform = false #1708

Open martinfruehmorgen opened 2 years ago

martinfruehmorgen commented 2 years ago

可复现的链接:

https://codesandbox.io/s/vxe-table-4-x-vue-3-0-wen-ti-yan-shi-forked-0tdjsm?file=/src/views/Demo1.vue

问题描述与截图:

In the codepen you will find 2 TreeTables. One with flat data with :tree-config="{ transform: true, rowField: 'id', parentField: 'parentId', expandAll: true, }"

and one with hierchical data with :tree-config="{ transform: false, expandAll: true, }"

The virtual scroller does not work for the second treetable (check in the inspector the class of the vxe-table. The first has is--virtual-y the second not)

期望的结果:

Both tables should have the virtual scolling available.

操作系统:

Windows 11

浏览器版本:

Edge Version 100.0.1185.50

vue 版本:

3.2.33

vxe-table 版本:

4.2.3

xuliangzhan commented 2 years ago

tree virtual scrolling can only be used if tree-config.transform is set.