T
TanStack5mo ago
stormy-gold

Unexpected rangeExtractor behaviour

When using the rangeExtractor I'm find that some indexes become virtualised even if they are included in the range. For example if I want to pin some items to the start and therefore always have them rendered I would add their indexes to the range, [0,1,2, ...virtualIndexes]. This works find but the problem is when there is a gap in indexes at the start. [0,1,3, ...virtualIndexes] in this example 3 would become virtual. Maybe I am miss-understanding something here? Here is my real example but with a hack to include those indexes up until the last pinned index, it works but it's not ideal. https://github.com/ynput/ayon-frontend/blob/9731b5cb58f21a90404aeb866db228e7c6860cf3/src/containers/ProjectTreeTable/hooks/useColumnVirtualization.tsx
GitHub
ayon-frontend/src/containers/ProjectTreeTable/hooks/useColumnVirtua...
Codebase of AYON server web interface. Contribute to ynput/ayon-frontend development by creating an account on GitHub.
1 Reply
adverse-sapphire
adverse-sapphire5mo ago
@Luke hmm what it means it become virtual, alll items from range will be in getVirtualItems

Did you find this page helpful?