VirtualScrollerEvent
const VirtualScrollerEvent: object;Bit flags accepted by VirtualScroller.subscribe and VirtualScroller.getRevision.
Type Declaration
ALL
readonly ALL: 7;RANGE
readonly RANGE: 1;SCROLL_SIZE
readonly SCROLL_SIZE: 2;SIZES
readonly SIZES: 4;Remarks
-
RANGE: VirtualScroller.from or VirtualScroller.to was changed; -
SCROLL_SIZE: VirtualScroller.scrollSize was changed; -
SIZES: at least one cached effective item size was changed.
Flags can be combined without allocating an array:
VirtualScrollerEvent.RANGE | VirtualScrollerEvent.SIZES.
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.