question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drag&Drop doesn`t work with NodeContentRenderer

See original GitHub issue

Reporting a Bug?

if i use NodeContentRenderer and as component use your node-renderer-default.js On dragStart i receive an error in console:

browser.js:38 Uncaught Error: Item must be an object. at Object.invariant [as default] (browser.js:38) at DragDropManagerImpl.beginDrag (dragDrop.js:54) at Object.beginDrag (DragDropManagerImpl.js:43) at HTML5Backend.webpackJsonp…/node_modules/react-dnd-html5-backend/lib/HTML5Backend.js.HTML5Backend.handleTopDragStart (HTML5Backend.js:298)

However without NodeContentRenderer - everything work fine. What can be a problem?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Jantwelcommented, Oct 31, 2018

@psycura @mi1ami1a I think the problem is in using functional component as nodeContentRenderer. If you convert it to class everything is ok.

0reactions
mi1ami1acommented, Nov 21, 2018

nodeContentRenderer={NodeRendererDefault} is work

Read more comments on GitHub >

github_iconTop Results From Across the Web

drag drop doesn't work for dynamically inserted element
insertHTML(//my draggable sections) then my js script doesn't seems to work anymore. I can't drag & drop my sections.
Read more >
Drag and click nodes · Issue #1457 · wbkd/react-flow - GitHub
This means you can't have node/edge dragging, add/delete connections, on hover effects like tooltips, scrolling inside nodes, etc. Again, for ...
Read more >
Using the HTML5 Drag and Drop API - web.dev
The HTML5 Drag and Drop API means that we can make almost any element on our page draggable. In this post we'll explain...
Read more >
How to implement drag and drop in React with React DnD
We'll drag the Image component and drop it onto another Image component, making our job a little easier. To implement this, use the...
Read more >
Drag operations - Web APIs | MDN
It is most common to accept or reject a drop based on the type of drag data in the data transfer — for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found