@univerjs/ui v0.5.0-beta.1 • 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
submodules/univer/packages/ui/src/components/hooks/virtual-list.ts:38