Reference home > @af-utils/virtual-react > createListItemRef
createListItemRef() function
Creates callback ref for list item at specified index.
Signature:
Parameters
Parameter |
Type |
Description |
---|---|---|
model |
VirtualScroller instance | |
itemIndex |
number |
item index |
Returns
(el: HTMLElement | null) => void
callback ref
Remarks
Calls VirtualScroller.attachItem() when item is mounted and VirtualScroller.detachItem() when item is about to unmount.