Skip to content

InfinityScroll

Unofficial

Virtual scrolling component that renders only visible items in large lists for performance.

Import:

import type { InfinityScroll } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface InfinityScroll

Properties

Property Type Description
height number Current visible height of the scroll container.
lastScroll number Last recorded scroll position.
queued null | unknown Queued computation task, or null if none is pending.
renderBlockSize number Number of items to render per block.
rootEl unknown Root element of the virtual scroll container.
scrollEl HTMLElement Scrollable element that handles scroll events.
setWidth boolean Whether the width should be explicitly set on items.
width number Current visible width of the scroll container.

Methods

Method Returns Description
_layout(x, y) unknown Internal method to perform layout calculations.
_measure(x) unknown Internal method to measure element dimensions.
_precompute(x) unknown Internal method to precompute layout information.
compute(x) unknown Compute visible items and update the virtual display.
findElementTop(x, y, z) unknown Find the top position of an element within the scroll container.
getRootTop() unknown Get the top offset of the root element.
invalidate(x, y) unknown Invalidate the cached layout for specific items.
invalidateAll() unknown Invalidate all cached layout information.
measure(x, y) unknown Measure dimensions for the given elements.
onResize() unknown Handle resize events and recalculate layout.
onScroll() unknown Handle scroll events and update the virtual display.
queueCompute() unknown Queue a deferred computation of visible items.
scrollIntoView(x, y) unknown Scroll the container to bring the specified element into view.
update(x, y, z, u, v, w) unknown Update the virtual scroll state with new parameters.
updateVirtualDisplay(x) unknown Update the virtual display to reflect current scroll position.

Links to this page: