Reference home > @af-utils/virtual-react
virtual-react package
React components, hooks and utils used to connect to VirtualScroller
Functions
Function |
Description |
---|---|
createGridItemRef(rowsModel, rowItemIndex, colsModel, colItemIndex) |
Creates callback ref for grid item at specified index. |
Creates callback ref for list item at specified index. | |
React component. Small abstraction, which in 90% cases allows to avoid hook boilerplate. | |
Map current visible items | |
Map current visible items and provide offset for each item. | |
React component. Rerenders only on certain VirtualScrollerEvent. Allows to optimize performance. | |
React hook. Rerenders component when one of VirtualScrollerEvent gets emitted. | |
React hook. Synchronizes scroller with model. | |
React hook. Allows to subscribe to VirtualScrollerEvent without unnecessary rerenders. | |
React hook. Optimal CSS markup for virtual scroll is not intuitive. Use this hook to avoid unneeded boilerplate. | |
React hook. Calls useVirtualModel() and synchronizes it with props | |
React hook. Creates and stores one VirtualScroller instance. It is not recreated during component lifecycle. |
Interfaces
Interface |
Description |
---|---|
Props passed to List item | |
List() component props | |
Subscription() component props |