lukasbach / react-complex-tree

Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop
https://rct.lukasbach.com
MIT License
915 stars 72 forks source link

Data fetching & virtualization #321

Open CHE1RON opened 6 months ago

CHE1RON commented 6 months ago

Hello there,

first of all, let me say that I really enjoy working with this library, especially its focus on a11y is appreciated! Now, after working with uncontrolled tree data, I wondered if anyone has managed the tree data using a controlled environment powered by data fetching libraries like react-query?

Also I wondered if it's suitable for virtualization (as this works best with flat lists which does not work well with a11y and semantic tree structures, like nested lists etc) .. ?

// Edit: I just found #263 and your new library, nevermind .. 😞

I'm grateful for any pointers or documentation you might be able to provide!

Cheers CHE1RON

lukasbach commented 6 months ago

Thanks for your appreciation! For your question regarding managing tree data with fetching libraries, I can't provide examples with that, but the use case should also work wikth uncontrolled environments which might be a bit easier to start with. I expanded the docs on static data providers and on custom data providers, maybe the examples there are helpful, the same way how in the docs items are injected, you could also alter the local tree data when something changes in the queried data. Of course it should also work with controlled environments, though you need to do a bit more heavy lifting there. For your comment on virtualization, yes, that is a bit tricky with the nested tree data, maybe the comments in the thread you found can help. And yes, once Headless Tree is production ready, that would fill the same use case as RCT but with some additional capabilities and support for virtualization.

Nishchit14 commented 6 months ago

@lukasbach I am eagerly waiting for headless-tree. Any CTA for it? Really appreciate roadmap clarity on it. Thanks for all your amazing OSS work.

lukasbach commented 4 months ago

Hey @Nishchit14, sorry for being silent on that topic and not bringing a lot of progress to that library. I had lots of topics on my mind the last few months, and wasn't really able to do much progress. I can't provide a specific timeline at the moment, but do plan to pick the remaining topics up soon and get a version suitable for production out during this summer.