Skip to main content

Module virtual_scroll

Module virtual_scroll 

Source
Expand description

Virtual scrolling primitive for List/DataGrid (Phase 2). Backends that render large collections (tpt-appfront-dom, tpt-appfront-canvas) can use VirtualScroll::visible_range to render only the items currently in view plus a small overscan buffer, instead of every item in the collection. Backends that don’t scroll interactively (tpt-appfront-html, tpt-appfront-ai-schema) simply ignore [NodeMeta::virtual_scroll] and render everything, which is correct for SSR/crawl/agent consumption.

Structs§

VirtualScroll
Configuration for windowed rendering of a fixed-height-item list. Set via NodeRef::virtual_scroll.
VisibleRange
The slice of items to actually render, plus spacer heights to preserve the illusion of the full list being present for scrollbar purposes.