minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.
MIT License
530 stars 71 forks source link

[Feature] support virtual list #173

Open percy507 opened 1 year ago

percy507 commented 1 year ago

Consider of current tree structure is nested, I wonder if it is possible to support virtual list for the case which has lots of nodes. 😂

I have checked the tree structure of VSCode, they use flat style and it's easy to support virtual list.

nilesh2b commented 1 year ago

How do we export the JSON data after shuffling or editing the node? Any comments.

percy507 commented 1 year ago

There is no direct way to do that. You need write your own function to watch every change (node editing, node opening, node shuffling) and then do the stuff as you want.

nilesh2b commented 1 year ago

Ok got it thanks. When I use initialOpen={true} it doesn't expand the tree while using the dynamic data in it. Any ideas?

azgorov commented 1 year ago

Is this feature is planned to be implemented? There are a lot of rendering issues if you have a lot items tree.

pirtlj commented 1 year ago

This is a must have for me to adopt

ayoub-root commented 1 year ago

any news? i think react-window will solve it using VariableSizeList easily, maybe this can help you https://codesandbox.io/s/react-window-dynamic-row-height-forked-y3dlcd

TejasviRaj commented 3 months ago

Hey, any update on this?

TejasviRaj commented 3 months ago

Or has anyone wrapped/changed the Tree component or created a new component (which similar data/prop structure) that supports virtual dnd tree?