Reference home > @af-utils/virtual-react > useScroller

useScroller() function

React hook. Synchronizes scroller with model.

Signature:

useScroller: (model: VirtualScroller, scroller: VirtualScrollerScrollElement | null) => void

Parameters

Parameter

Type

Description

model

VirtualScroller

scroller

VirtualScrollerScrollElement | null

Returns

void

Remarks

Should be used in window-scroll cases, otherwise ref={el => model.setScroller( el )} is preferrable.