typealias@af-utils/virtual-preact
On this page

ListProps<Data>

type ListProps<Data> = Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "ref" | "style"> & object;

Props accepted by the Preact VirtualList component.

Type Declaration

children

children: ComponentType<ListItemProps<Data>>;

Component used to render one virtual item.

optional footer?: ComponentChildren;

Content rendered after the native scroll-size element.

getItemKey?

optional getItemKey?: (index) => string | number;

Resolve stable item identities after records change index.

Parameters

index

number

Returns

string | number

optional header?: ComponentChildren;

Content rendered before the native scroll-size element.

itemData?

optional itemData?: Data;

Data forwarded to every rendered item.

model

model: VirtualScroller;

Model owning list geometry and the rendered range.

style?

optional style?: JSX.CSSProperties;

Inline presentation styles for the scroller.

Type Parameters

Data

Data = unknown