Skip to content
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

Cannot have two HTML5 backends at the same time. #177

Open
gmarathi-nisum-com opened this issue Oct 10, 2017 · 10 comments
Open

Cannot have two HTML5 backends at the same time. #177

gmarathi-nisum-com opened this issue Oct 10, 2017 · 10 comments

Comments

@gmarathi-nisum-com
Copy link

Hi,

We are using react-sortable tree component where i do not need drag/drop functionlity.At the same time, we are using react-trello component which is having kanban board with drag and drop functionlity.
These two components are being used in same page.
So, we are getting Cannot have two HTML5 backends at the same time. error.

We have made canDrag={false} canDrop={false}. But Still we are facing the same issue.

Can you Please help me to remove draggablecontext from sortable tree.

@fritz-c
Copy link
Member

fritz-c commented Oct 10, 2017

From the Troubleshooting section of the readme:

react-dnd only allows for one DragDropContext at a time (see: react-dnd/react-dnd#186). To get around this, you can import the context-less tree component via SortableTreeWithoutDndContext.

// before
import SortableTree from 'react-sortable-tree';

// after
import { SortableTreeWithoutDndContext as SortableTree } from 'react-sortable-tree';

@sakhamuri92
Copy link

I am also having same above issue.I used the above approach u mentioned but the same issue i am facing is there way to remove that dragging functionality from that tree.

import { SortableTreeWithoutDndContext as SortableTree } from 'react-sortable-tree';

@sakhamuri92
Copy link

// before
import SortableTree from 'react-sortable-tree';

// after
import { SortableTreeWithoutDndContext as SortableTree } from 'react-sortable-tree';

among these two i am using the second statement only for tree and if iam providing Sortable tree like below i am getting other issues also

Eg:

Or we need to use like this.

@top1st
Copy link

top1st commented Dec 19, 2017

image

import { SortableTreeWithoutDndContext as SortableTree, changeNodeAtPath } from 'react-sortable-tree';

@uptonking
Copy link

uptonking commented Dec 29, 2017

find a solution, just put DragDropContext at the top level, like wrap the parent component
see discussion here

@tejaswaroop51
Copy link

tejaswaroop51 commented Mar 19, 2018

its not working at all @uptonking @sakhamuri92 @fritz-c . Tried different combinations and solutions still I am receiving same error. Really getting pissed off with this component. Thanks for making our lives hell

@shalinigr
Copy link

@top1st Were you able to resolve this issue? I'm getting the same error when I use the SortableTreeWithoutDndContext.

@wuweiweiwu
Copy link
Member

wuweiweiwu commented Mar 28, 2018

@tejaswaroop51 Getting mad at the component and/or maintainers won't help. You have to realize that @fritz-c and I maintain this component in our free time. If you have an urgent issue, we try our best. If you are unhappy feel free to contribute/investigate/open a PR.

@shalinigr @top1st @uptonking @sakhamuri92 If you guys can post a minimal reproduction that would be most helpful. Otherwise, I will investigate when I next have time.

Also just for reference. the basic example provided on the demo site uses the tree without dnd context

@dnizetic
Copy link

It happens after a hot reload. I.e. change code, page hot reloads, then try dragging a node.

@csenn
Copy link

csenn commented Apr 4, 2021

react-create-app [4.0.3] hot reloading seems to be causing the issue for me. For anyone else with the same issue, adding the FAST_REFRESH=false env variable seems to have solved it. https://create-react-app.dev/docs/advanced-configuration/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants