VirtualScrollerEvent
type VirtualScrollerEvent =
| typeof RANGE
| typeof SCROLL_SIZE
| typeof SIZES;VirtualScrollerEvent is exported as a constant, so a separate type is
needed to emulate enum behavior.
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.
- GridlitThis example combines one vertical model and one horizontal model to virtualize a dynamic two-dimensional grid.
- 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.
- Load On DemandlitThis example loads another data batch when the rendered range approaches the end of the current collection.