@univerjs/ui v0.4.2 • Docs
Function: useVirtualList()
function useVirtualList<T>(list, options): readonly [{
data: T;
index: number;
}[], {
containerProps: {
onScroll: (e) => void;
};
scrollTo: (index) => void;
wrapperStyle: {
height: undefined | string;
marginTop: undefined | string;
};
}]
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
list | T [] |
options | IVirtualListOptions <T > |
Returns
readonly [{
data
: T
;
index
: number
;
}[], {
containerProps
: {
onScroll
: (e
) => void
;
};
scrollTo
: (index
) => void
;
wrapperStyle
: {
height
: undefined
| string
;
marginTop
: undefined
| string
;
};
}]
Defined in
packages/ui/src/components/hooks/virtual-list.ts:38 (opens in a new tab)