UNPKG

reablocks

Version:
26 lines (25 loc) 729 B
export interface InfinityListInputs { /** * The array of items to page on. */ items: any[]; /** * The page size. Combined with the threshold, this will determine the page size. */ size?: number; /** * The fuzzy threshold to use when calculating the next page size. */ threshold?: number; /** * The numer of items to show in the next page. If undefined, will use the size. * If you want to show all items, pass infinity. */ nextSize?: number; } export declare const useInfinityList: ({ items, threshold, size, nextSize }: InfinityListInputs) => { data: any[]; hasMore: boolean; remaining: number; showNext: (amount?: number) => void; };