import React from "react"; import type { ComponentType } from "react"; import type { VirtualItem, Virtualizer } from "@tanstack/react-virtual"; import "./index.less"; export type Direction = "horizontal" | "vertical"; export type VirtualListHandler = Virtualizer; export interface ItemProps { index: number; data: T; } export interface Props { initialRect?: { width: number; height: number; }; data: T[]; renderItem: ComponentType>; rowKey?: keyof T | "index"; direction?: Direction; fixedSize?: (index: number) => number; overscan?: number; id?: string; className?: string; style?: React.CSSProperties; innerClassName?: string; itemClassName?: string; itemStyle?: React.CSSProperties; itemWrapperClassName?: string; itemWrapperStyle?: React.CSSProperties; footer?: React.ReactNode; footerSize?: number; onScroll?: React.UIEventHandler; onVirtualItemsChange?: (items: VirtualItem[]) => void; scrollRef?: React.Ref; listRef?: React.Ref; } /** * Efficiently rendering large lists and tabular data */ export declare const VirtualList: ({ data, rowKey, direction, renderItem: renderData, overscan, initialRect, fixedSize, id, className, style, innerClassName, itemClassName, itemStyle, itemWrapperClassName, itemWrapperStyle, footer, footerSize, onScroll, onVirtualItemsChange, scrollRef, listRef, }: Props) => React.JSX.Element;