import { Component } from 'react'; import { NoContentRenderer, Alignment, CellSize, CellPosition, OverscanIndicesGetter, RenderedSection, CellRendererParams, Scroll as VirtualGridScroll, Scroll } from './types'; import accessibilityOverscanIndicesGetter from './accessibilityOverscanIndicesGetter'; import { VirtualGridProps } from './VirtualGrid'; /** * It is inefficient to create and manage a large list of DOM elements within a scrolling container * if only a few of those elements are visible. The primary purpose of this component is to improve * performance by only rendering the DOM nodes that a user is able to see based on their current * scroll position. * * This component renders a virtualized list of elements with either fixed or dynamic heights. */ interface VirtualTableBodyProps extends Omit { 'aria-label'?: string; /** * Removes fixed height from the scrollingContainer so that the total height * of rows can stretch the window. Intended for use with WindowScroller */ autoHeight?: boolean; /** Optional CSS class name */ className?: string; /** * Used to estimate the total height of a List before all of its rows have actually been measured. * The estimated total height is adjusted as rows are rendered. */ estimatedRowSize?: number; /** Height constraint for list (determines how many actual rows are rendered) */ height: number; /** Optional renderer to be used in place of rows when rowCount is 0 */ noRowsRenderer?: NoContentRenderer; /** Callback invoked with information about the slice of rows that were just rendered. */ onRowsRendered?: (params: any) => void; /** * Callback invoked whenever the scroll offset changes within the inner scrollable region. * This callback can be used to sync scrolling between lists, tables, or grids. */ onScroll?: (params: Scroll) => void; /** See VirtualGrid#overscanIndicesGetter */ overscanIndicesGetter?: OverscanIndicesGetter; /** * Number of rows to render above/below the visible bounds of the list. * These rows can help for smoother scrolling on touch devices. */ overscanRowCount?: number; /** Either a fixed row height (number) or a function that returns the height of a row given its index. */ rowHeight: CellSize; /** Responsible for rendering a row given an index; ({ index: number }): node */ rowRenderer: any; /** Number of rows in list. */ rowCount: number; /** See VirtualGrid#scrollToAlignment */ scrollToAlignment?: Alignment; /** Row index to ensure visible (by forcefully scrolling if necessary) */ scrollToIndex?: number; /** Vertical offset. */ scrollTop?: number; style?: Object; /** Tab index for focus */ tabIndex?: number; /** Width of list */ width: number; columns?: any[]; columnCount?: number; rows: any[]; } export declare class VirtualTableBody extends Component { static defaultProps: { autoHeight: boolean; estimatedRowSize: number; onScroll: () => void; noRowsRenderer: () => any; onRowsRendered: () => void; overscanIndicesGetter: typeof accessibilityOverscanIndicesGetter; overscanRowCount: number; scrollToAlignment: string; scrollToIndex: number; style: {}; scrollContainerComponent: string; innerScrollContainerComponent: string; }; VirtualGrid: any; forceUpdateVirtualGrid(): void; /** See VirtualGrid#getOffsetForCell */ getOffsetForRow({ alignment, index }: { alignment: Alignment; index: number; }): any; /** CellMeasurer compatibility */ invalidateCellSizeAfterRender({ columnIndex, rowIndex }: CellPosition): void; /** See VirtualGrid#measureAllCells */ measureAllRows(): void; /** CellMeasurer compatibility */ recomputeVirtualGridSize({ columnIndex, rowIndex }?: CellPosition): void; /** See VirtualGrid#recomputeVirtualGridSize */ recomputeRowHeights(index?: number): void; /** See VirtualGrid#scrollToPosition */ scrollToPosition(scrollTop?: number): void; /** See VirtualGrid#scrollToCell */ scrollToRow(index?: number): void; render(): import("react/jsx-runtime").JSX.Element; _cellRenderer: ({ parent, rowIndex, style, isScrolling, isVisible, key }: CellRendererParams) => any; _setRef: (ref: any) => void; _onScroll: ({ clientHeight, scrollHeight, scrollTop }: VirtualGridScroll) => void; _onSectionRendered: ({ rowOverscanStartIndex, rowOverscanStopIndex, rowStartIndex, rowStopIndex }: RenderedSection) => void; } export {}; //# sourceMappingURL=VirtualTableBody.d.ts.map