createVirtual API
API reference for the createVirtual composable.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| createVirtual | Data |
| createFilter | Data |
| createOverflow | Semantic |
Functions
createVirtual
(items: Ref<readonly T[], readonly T[]>, _options?: VirtualOptions) => VirtualContext<T>Virtual scrolling composable for efficiently rendering large lists
createVirtualContext
(items: Ref<readonly T[], readonly T[]>, _options?: VirtualContextOptions) => ContextTrinity<VirtualContext<T>>Creates a virtual scrolling context with dependency injection support.
useVirtual
(namespace?: string) => VirtualContext<T>Returns the current virtual context from dependency injection.
Options
onStartReached
((distance: number) => void | Promise<void>) | undefinedThe callback to call when the start is reached.
onEndReached
((distance: number) => void | Promise<void>) | undefinedThe callback to call when the end is reached.