-
Notifications
You must be signed in to change notification settings - Fork 901
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
Problems with HTML5 Backend #44
Comments
Hi, thanks for trying out the component. Try using the react-dnd context you're already using along with the context-less exported component Something like: import { SortableTreeWithoutDndContext } from 'react-sortable-tree';
import { dragDropContext } from 'react-dnd';
// ...
const myReactDndContext = dragDropContext(HTML5Backend);
const SortableTree = myReactDndContext(SortableTreeWithoutDndContext);
const MyOtherDndComponent = myReactDndContext(OtherComponent);
// ... use them in render() |
Going to treat this as closed due to inactivity. |
Thanks @fritz-c ! It worked for me using |
Hello! I have the same problem. App.js
DirectoriesList.js
With this code, when I tried to drag any element in the tree I got "Cannot have two HTML5 backends at the same time." |
@aterentev Need to put brackets around the name in the import as follows: import { SortableTreeWithoutDndContext } from 'react-sortable-tree'; |
Thanks @fritz-c ! It helps. |
My component that uses the tree is loaded into another project by clicking on one of the tabs. The first time you load a tree, an error occurs - "Cannot have two HTML5 backends at the same time". Only the change in value helps window.__isReactDndBackendSetUp = undefined or window.__isReactDndBackendSetUp = false. The tree is loaded but the tree does not work at all drag and drop. Image |
@IvanGrodno this issue is already documented as a bug / more investigation. For future reference, its probably best to open a new issue or look if this issue already exists. Maintainers rarely check closed issues. |
Hi everyone,
i start using React Sortable Tree and i get error "Cannot have two HTML5 backends at the same time.".. I am using it with React DnD so i think that both components use react-dnd-html5-backend so there is a problem. Does someone know how to solve it? Thanks.
The text was updated successfully, but these errors were encountered: