ui/build/virtual-list/virtual-list.svelte
ui/build/virtual-list/virtual-list.svelte
Interfaces
VirtualListProps
Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:4
Extends
Omit<HTMLAttributes<HTMLElement>,"children">
Type Parameters
| Type Parameter |
|---|
T |
Indexable
[key: symbol]: false | Attachment<HTMLElement> | null | undefined[key: `data-${string}`]: anyProperties
as?
optional as?: "div" | "ol" | "ul";Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:10
ol/ul render each item as an li.
estimateSize?
optional estimateSize?: number;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:12
First-paint height guess in px; every mounted item is measured afterwards.
gap?
optional gap?: number;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:14
Space after every item but the last, in px.
item
item: Snippet<[T, number]>;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:8
itemProps?
optional itemProps?: (item, index) => VirtualListItemProps;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:17
Attributes for the item element itself — no wrapper between it and the list (Sortable).
Parameters
| Parameter | Type |
|---|---|
item |
T |
index |
number |
Returns
items
items: readonly T[];Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:5
key
key: (item) => string;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:7
Stable identity; measured heights follow the key through reorders and remounts.
Parameters
| Parameter | Type |
|---|---|
item |
T |
Returns
string
onRange?
optional onRange?: (lastIndex) => void;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:19
Called with the last mounted index whenever the window moves; drives infinite loading.
Parameters
| Parameter | Type |
|---|---|
lastIndex |
number |
Returns
void
overscan?
optional overscan?: number;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:15
ref?
optional ref?: HTMLElement | null;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:23
The list element; its direct children are exactly the mounted items.
scrollElement?
optional scrollElement?: HTMLElement | null;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:21
Defaults to the nearest Scroll. Without either, every item renders in flow.
Type Aliases
default
type default<T> = InstanceType<typeof default>;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:46
Type Parameters
| Type Parameter |
|---|
T |
VirtualListItemProps
type VirtualListItemProps = HTMLAttributes<HTMLElement> & Record<`data-${string}`, string | undefined>;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:3
Variables
default
const default: $$IsomorphicComponent;Defined in: apps/website/.api-docs-entry/ui/build/virtual-list/virtual-list.svelte.d.ts:46