T
TanStack7d ago
harsh-harlequin

2D nested lists for unbounded data.

Thanks in advance to anyone looking at this question. I'm working on a feature with two levels of unbounded lists: a parent list where each item contains a child component with its own nested list of items. I'm trying to implement virtualization using TanStack Virtual, but I'm concerned the complexity might exceed the library's intended use case. Ideally, I'd like to virtualize across all nested list items globally—rendering only a subset of child items across all parent containers, rather than virtualizing each nested list independently. This would mean showing some items from one parent's nested list alongside items from sibling parents' nested lists, all within a single virtual window. Does this sound even plausible? Alternatively I assume the next step is having a virtual window around the top level lists and then a nested virtual windown inside of each list's child list. I created an example of the code inside of a CodeSandbox here: https://codesandbox.io/p/sandbox/4nnwy5. The Sandbox has a simple representation of the feature i'm building, it is about 100x more complex in reality, but the same simple pattern applies.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?