Reference home > @af-utils/virtual-core > VirtualScroller > setContainer
VirtualScroller.setContainer() method
Informs model about items container element. Usually not needed.
Signature:
Parameters
Parameter |
Type |
Description |
---|---|---|
element |
HTMLElement | null |
container element |
Returns
void
Remarks
By default top/left offset between scroll container and first scrollable item is 0
. In this case just VirtualScroller.setScroller() is needed. But extra element is needed when something “foreign” stands between scroll container and first scrollable item to measure distance between them. That extra element is represented as ItemsContainer
on this schema:
Must be called with null
before killing the instance.