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.

SortableTreeWithoutDndContext not work react-dnd@latest

See original GitHub issue

Hi, i have code: App.js


import { DndProvider } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';


render() {
  return (
      <DndProvider backend={HTML5Backend}>
        <App />
      </DndProvider>
  )
}

Tree.js

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


render() {
  return (
    <SortableTree treeData={state.list} /> 
  )
}

if I try react-dnd@10.0.2 then it does not work (render null), but if I try react-dnd@9.5.1 then everything works

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
TdyPcommented, Jun 26, 2020

I finally had to use it, so digged out a little more. Upgrading react-sortable-tree depdencies to latest react-dnd fixed the issue. I opened a PR for that. Hopefully this will be merged soon 🤞

3reactions
ayarhlainecommented, Jul 10, 2020

Ah, already fixed this issue, I still having problem using SortableTreeWithoutDndContext.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-sortable-tree: code doesn't display anything
I'm working with reactjs 17 but I don't know why this code doesn't display anything. import React, { Component } from 'react'; ...
Read more >
Drag-and-drop sortable component for nested data and ...
I need a method where I can pass parentKey and index so that new node is create under parent at specific index. image....
Read more >
react-sortable-tree [javascript]: Datasheet - Package Galaxy
If not set explicitly, a default value is applied by react-sortable-tree for you for ... "build:storybook": "npm run clean:storybook && build-storybook -o ...
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