frontend-collective / react-sortable-tree

Drag-and-drop sortable component for nested data and hierarchies
https://frontend-collective.github.io/react-sortable-tree/
MIT License
4.9k stars 897 forks source link

Using the react-sortable-tree in react 18 #940

Open OrMeirchak opened 1 year ago

OrMeirchak commented 1 year ago

I recently updated the react version in the project I'm working on from "16.2.0" to "18.2.0". Since doing this I get the following errors:

uncaught error: unable to find node on an unmounted component TypeError: this.clearMonitorSubscription is not a function. the above error occurred in <scrolling(List)> component

Searching the internet shows that the "react-sortable-tree" library is no longer supported in react 18. And this is probably the reason for these errors.

Is there anyone who managed to work with the library in react 18?

keshav100 commented 1 year ago

Same issue i am facing. Unable to find any solution so I started to develop my own version. Still, it is incomplete. https://github.com/keshavgautam/react-sortable-tree-by-keshav

matin-mortazavi commented 6 months ago

I recently updated the react version in the project I'm working on from "16.2.0" to "18.2.0". Since doing this I get the following errors:

uncaught error: unable to find node on an unmounted component TypeError: this.clearMonitorSubscription is not a function. the above error occurred in <scrolling(List)> component

Searching the internet shows that the "react-sortable-tree" library is no longer supported in react 18. And this is probably the reason for these errors.

Is there anyone who managed to work with the library in react 18?

could u find any solution?

gaeundev commented 3 months ago

solution!

<SortableTree
  {...props}
  isVirtualized={false}
/>
NetanelElimelech commented 3 months ago

@gaeundev Thank you! It works :)