Replies: 2 comments
-
Virtualization is much more straightforward to achieve if you render your tree view with a flat DOM structure. As long as you follow this guideline this should work great with @dnd-kit. The tree example follows this guidance as you can see, and would therefore easily be virtualizable: Screen.Recording.2024-03-13.at.8.18.43.AM.mov |
Beta Was this translation helpful? Give feedback.
-
That's great news! I'm actually migrating from react-sortable-hoc, where I implemented a single level tree view. It took some effort but the performance was perfect up to 50,000 items! So you say that following the official tree examples I can hope similar performance from dnd-kit? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to implement a file system like tree. After checking out dozens of libraries, I found dnd-kit to be the best, even though it needs a lot of helper functions to make it into a full fledged tree view library, like React Arborist for example.
One question though: the docs say that in virtualized mode only a few sorting strategies are supported:
https://docs.dndkit.com/presets/sortable#sorting-strategies
Does this work with tree-view? I'm talking about the example docs / sortable tree section, for example:
https://master--5fc05e08a4a65d0021ae0bf2.chromatic.com/?path=/story/examples-tree-sortable--all-features
Arborist works quite nicely with tens of thousands of items in tree view mode, I'm hoping to do the same using dnd-kit.
Beta Was this translation helpful? Give feedback.
All reactions