Reference home > @af-utils/virtual-core > VirtualScrollerInitialParams > estimatedWidgetSize
VirtualScrollerInitialParams.estimatedWidgetSize property
Estimated size of scroll element.
Signature:
estimatedWidgetSize?: number;
Remarks
Actual size is always reported by ResizeObserver
, but this property together with VirtualScrollerRuntimeParams.estimatedItemSize and VirtualScrollerRuntimeParams.overscanCount can be used in server-side rendering.
Quantity of SSR-rendered elements can be calculated this way:
Math.min( itemCount, Math.ceil( estimatedWidgetSize / estimatedItemSize ) + overscanCount )