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

Walk utility function does not walk lazy child nodes #918

Open igiz opened 2 years ago

igiz commented 2 years ago

Hi,

As far as I am aware the documentation on lazy loading is a bit scarce , but some of the nodes children on our usage of the tree are an implementation of GetTreeItemChildrenFn.

Now we have a problem , we need to programmatically expand the node before we can copy its content to clipboard. I tried to approach this with the walk with the ignoreCollapsed set to false. However this does not trigger the lazy load to be expanded programmatically , nor does directly changing node.expanded field.

Any idea how one could expand a lazy node programmatically? Thanks