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
Using SortableTreeWithoutDndContext does not work #788
Comments
Any update? |
@zourbuth You need to wrap your component with the
ref: https://github.com/frontend-collective/react-sortable-tree/blob/master/stories/touch-support.js |
@zli-aa, we did. We wrap it in top level component.
|
@zourbuth I had the same problem and it was because I ended up with two copies of react-dnd in my final Webpack bundle, one that I was importing and the other that react-sortable-tree imported. Because |
I was having the same problem for months now and none of the solutions worked except for @drewpc 's one #788 (comment) ! Thanks :) If anyone is interested, my webpack modification looks like this: resolve: {
...
alias: {
'react-dnd': path.resolve(__dirname, '../node_modules/react-dnd'),
},
}, |
I just install and configure webpack just for try @drewpc solution but it didn't work for me, I've tried @Nauss just like that :( didn't work either, anyone have suggestions please? btw: In my case I have a component that use react-sortable-tree and other that I'm trying to use basic HTML Drag and drop using draggable="true", but it doesn't work due the this lib, If I stop loading everything works :/ so I assume the issue is related |
None of the suggestions above seem to have helped. Tried resolving and also whenever I use SortableTreeWithoutDndContext it just doesn't render anything. |
I faced the same issue with React 18 and typescript |
@minhdtb Were you able to fix the problem? Using React 18 and typescript |
There are two DnDs in a page.
One for the RST with external nodes, and the other for the tab swapping.
We place
<DndProvider />
in top level component anduse SortableTreeWithoutDndContext in child component
to avoid two HTML backends issue.
It seems the RST renders nothing or returns null as the dragDropManager is undefined.
react-sortable-tree/src/react-sortable-tree.js
Lines 941 to 949 in 2a5f741
Is there a workaround to deal with this issue?
Thank You.
The text was updated successfully, but these errors were encountered: