TbwScrollDetail
Detail payload for the tbw-scroll event.
Dispatched on the grid host whenever the vertical viewport scrolls (rAF-batched — at most one per frame). Use to trigger pagination, defer heavy cell content rendering, dismiss overlays, or sync a scroll-tracking UI outside the grid.
For server-side pagination of large datasets, prefer
ServerSidePlugin which handles block fetching out of the box.
Example
Section titled “Example”grid.addEventListener('tbw-scroll', (e) => { const { scrollTop, scrollHeight, clientHeight } = e.detail; if (scrollTop + clientHeight >= scrollHeight - 200) loadMore();});Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
scrollTop | number | Current vertical scroll offset in pixels (faux scrollbar). |
scrollHeight | number | Total scrollable height in pixels (faux scrollbar). |
clientHeight | number | Visible viewport height in pixels (faux scrollbar). |
direction | vertical | horizontal | Axis that triggered this dispatch. Currently always 'vertical'; 'horizontal' is reserved for a future opt-in dispatch and is declared up-front so consumer narrowing remains source-compatible. |
See Also
Section titled “See Also”DataGridEventMapfor all event types
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt