x-extends / vxe-table

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

vxe-table, virtual scroll tree table filter error #1575

Open EstebanFuentealba opened 2 years ago

EstebanFuentealba commented 2 years ago

可复现的链接:

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

问题描述与截图:

When filtering a tree table (virtualized) with configuration tree-config.transform = true the filter is not applied to the children

Bug

I think the error may be here since when filtering if treeOpts.transform == true, tableData should be transformed to an array XEUtils.toTreeArray (tableData)

https://github.com/x-extends/vxe-table/blob/3397c6d62f4f0388b70f9485bb52ff84aa394bec/packages/table/src/table.ts#L1183-L1201

期望的结果:

filter-method should receive every row (not a tree) to be able to filter every child

操作系统:

MacOS Monterey M1

浏览器版本:

Chrome/95.0.4638.69

vue 版本:

3.1.1

vxe-table 版本:

4.0.21

xuliangzhan commented 2 years ago

fix v4.1.12+ You can try updating to the latest version.