react-sortable-tree
react-sortable-tree copied to clipboard
fix: downgrade dnd version, fix the drag move delay issue
Hi @nosferatu500 , there is a issue related to react-dnd@14
. There is observable delay when I drag and move the node. And also, because the delay happend(I'm not quite sure), canDrop
was not be trigged correctly, and the node was moved to a wrong place.
You could check the difference below. The first use react-dnd@14
, and the second which i downgrade to @11
.
Thanks for the PR, but... Personally, I don't like to downgrade something unless it contains critical issues.
Previously, I thought about rewriting the package to hooks (react v18.0+)
+ react-dnd (v16.0+)
(link, but there was not enough time for this.
This is the interesting issue... Hmm... Maybe I'll try to check and fix it myself in the next 2-3 weeks. (too busy right now, sorry)
Yes I also try to fix it this week but can't find the way. I upgrade the patch version of react-dnd
(@14.0.5), but it not works. Because the react-dnd@15
remove the decortor support and use hooks instead, the only way maybe rewriting the codebase to hooks.
I'll check the branch v6
and see if i can do something based on your work. Thank you.