mapVirtualRange()
function mapVirtualRange<T>(model, callback): T[];Map the current rendered range without first allocating an indexes array.
Type Parameters
T
T
Parameters
model
callback
(index) => T
Returns
T[]
Related examples
- Vanilla ListcoreThis standalone example shows the framework-neutral VirtualScroller and VirtualScrollerLayout APIs with ordinary DOM nodes. It demonstrates range rendering, item measurement, offset/index conversion, programmatic scrolling, and measurement invalidation without a framework adapter.
- Live FeedcoreThis example appends variable-height messages while demonstrating end-anchor behavior: a reader at the end stays at the newest message, while a reader who scrolled upward keeps the current viewport.
- Tanstack TablecoreThis example combines TanStack Table v9 sorting and filtering row models with AF Virtual Scroll. TanStack owns the headless table state; the virtual scroller renders and measures only the visible rows while preserving stable row identity.
- TablelitThis example virtualizes dynamic rows without breaking native table semantics. Spacer rows represent content above and below the rendered range because a positioning wrapper cannot sit between tbody and tr.
- Simple PrimitivespreactThis example builds a list from the adapter's lower-level model, layout, range, and item primitives instead of its high-level list binding.
- Nested ContainerpreactThis example separates the native scroll owner from the element that contains the virtual range. Content can appear before the list while core still measures the nested offset and publishes the correct geometry.