-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
虚拟表格拖动无法正常工作 #48237
Comments
Start a new pull request in StackBlitz Codeflow. |
|
不对,好像已经支持了 components.body #47098 |
我也是看到支持了才开始用的,但似乎还有问题 |
https://stackblitz.com/edit/react-2ze7sa-woksuw?file=demo.tsx 先按这里的,官方的 demo 也会改成 Context 方式,现在 React 官方不推荐用 React.cloneElement 了。并且 virtual 下 Row 写法不同,要用 forwardRef 包一下,将 ref 和 setNodeRef 一起传递给 dom |
首先,非常感谢,新写法下拖动按钮可以正常显示了,但似乎由于虚拟滚动的原因,行往下拖动一行直到超出屏幕外(假设有20条,可视区域只能显示10条,现在要拖动第一条到第15条下面),竖向滚动条不会随着移动,这样就只能在显示出来的元素进行拖动排序,超出屏幕外就不行了 |
这应该需要自己配合 Table ref scrollTo 来自己实现了,你自己先试试,后面有时间我也会尝试下 |
好的,再次感谢 |
滚动后拖拽位置会有点不准,但是只能做到这样了,影响不大。 |
Reproduction link
Steps to reproduce
What is expected?
虚拟表格拖动可以正常工作
What is actually happening?
虚拟表格显示异常
The text was updated successfully, but these errors were encountered: