ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
92.26k stars 49.44k forks source link

Tree drag is not work good when in virtual list (Tree 组件在虚拟列表的情况下,拖拽功能有问题) #31938

Closed hyy215 closed 3 years ago

hyy215 commented 3 years ago

What problem does this feature solve?

Scene:I need to use the virtual list to speed up rendering and support the file drag function When there are many contents in the file list

场景:当文件列表内容较多的时候,需要使用虚拟列表加快渲染,同时还需要支持文件的拖拽功能

problem: When the tree component uses a virtual list and drags it to the top and bottom of the list, the scroll bar cannot scroll up and down, resulting in the failure of the drag function

问题: 当 Tree 组件使用虚拟列表,拖拽到列表顶部、底部的时候,滚动条无法向上、向下滚动,导致拖拽功能失效

but react-sortable-tree can support the situation

但是 react-sortable-tree 这个库可以支持这种情况

What does the proposed API look like?

不需要新增 API 即可实现该功能

afc163 commented 3 years ago

Duplicate of #31057