This issue is still biting and it has been over a year since someone posted :).
It seems the 'current' solution is really depending on react-dnd version 3.0.2.
Is there a new update for this that does not require me to move from the latest, which is like on version 7, down to version 3?
I created the most bare bones class I could and keep getting odd errors.
Any ideas.. I really want to use this package.. it looks like the best thing available for this type of capability.
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of SortableTreeWithoutDndContext.
import React, { Component } from 'react';
// import SortableTree from 'react-sortable-tree';
import FileExplorerTheme from 'react-sortable-tree-theme-file-explorer';
import { SortableTreeWithoutDndContext as SortableTree } from 'react-sortable-tree';
export class QuestionTreeView extends Component {
constructor(props) {
super(props);
this.state = {
treeData: [{ title: 'src/', children: [{ title: 'index.js' }] }],
};
}
render() {
return (
I just encountered the same thing as you on the latest release (2.5.0) so I rolled back to 2.3.0 because of this https://github.com/frontend-collective/react-sortable-tree/issues/429 and now its working again. Looks like an issue being sorted out at the moment.
yep! we're working it out!!
Great thank you!! looks like a very awesome package. I was able to get it working with 2.3 as suggest so will use that. Looking forward to the update!
Fixed in 2.6.0!
encountered again:
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.0",
"react-sortable-tree": "^2.8.0",
See: https://github.com/frontend-collective/react-sortable-tree/issues/830
@wuweiweiwu is this being looked at? the same problem is happening in version 2.8.0 as @OR13 mentioned above
Most helpful comment
encountered again:
See: https://github.com/frontend-collective/react-sortable-tree/issues/830