@types/react-virtualized
- Version 9.22.0
- Published
- 77.2 kB
- 2 dependencies
- MIT license
Install
npm i @types/react-virtualized
yarn add @types/react-virtualized
pnpm add @types/react-virtualized
Overview
TypeScript definitions for react-virtualized
Index
Variables
Functions
Classes
Type Aliases
- Alignment
- ArrowKeyStepperChildProps
- ArrowKeyStepperProps
- AutoSizerProps
- CellMeasurerCacheParams
- CellMeasurerProps
- CellRenderer
- CellSizeAndPositionManager
- CollectionCellGroupRenderer
- CollectionCellGroupRendererParams
- CollectionCellRenderer
- CollectionCellRendererParams
- CollectionCellSizeAndPosition
- CollectionCellSizeAndPositionGetter
- CollectionProps
- ColumnProps
- ColumnSizerProps
- ConfigureParams
- ContainerSizeAndOffset
- Dimensions
- GetVisibleCellRangeParams
- GridCellProps
- GridCellRangeProps
- GridCellRangeRenderer
- GridCellRenderer
- GridProps
- GridState
- HeaderMouseEventHandlerParams
- Index
- IndexRange
- InfiniteLoaderChildProps
- InfiniteLoaderProps
- KeyMapper
- ListProps
- ListRowProps
- ListRowRenderer
- Map
- MasonryCellProps
- MasonryProps
- MasonryState
- MultiGridProps
- MultiGridState
- OnCellsRenderedCallback
- OnScrollCallback
- OnScrollParams
- OverscanIndexRange
- OverscanIndices
- OverscanIndicesGetterParams
- Position
- Positioner
- PositionInfo
- RowMouseEventHandlerParams
- ScrollbarPresenceParams
- ScrollDirection
- ScrollEventData
- ScrollIndices
- ScrollParams
- ScrollPosition
- ScrollSyncChildProps
- ScrollSyncProps
- ScrollSyncState
- SectionRenderedParams
- Size
- SizeAndPositionData
- SizeAndPositionInfo
- SizedColumnProps
- SizeInfo
- SortDirectionType
- SortParams
- TableCellDataGetter
- TableCellDataGetterParams
- TableCellProps
- TableCellRenderer
- TableHeaderProps
- TableHeaderRenderer
- TableHeaderRowProps
- TableHeaderRowRenderer
- TableProps
- TableRowProps
- TableRowRenderer
- VisibleCellRange
- WindowScrollerChildProps
- WindowScrollerProps
- WindowScrollerState
Variables
variable accessibilityOverscanIndicesGetter
const accessibilityOverscanIndicesGetter: OverscanIndicesGetter;
variable defaultCellRangeRenderer
const defaultCellRangeRenderer: GridCellRangeRenderer;
variable defaultOverscanIndicesGetter
const defaultOverscanIndicesGetter: OverscanIndicesGetter;
variable defaultTableCellDataGetter
const defaultTableCellDataGetter: TableCellDataGetter;
variable defaultTableCellRenderer
const defaultTableCellRenderer: TableCellRenderer;
variable defaultTableHeaderRowRenderer
const defaultTableHeaderRowRenderer: TableHeaderRowRenderer;
variable defaultTableRowRenderer
const defaultTableRowRenderer: TableRowRenderer;
variable IS_SCROLLING_TIMEOUT
const IS_SCROLLING_TIMEOUT: number;
Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. This improves performance and makes scrolling smoother.
variable SortDirection
const SortDirection: SortDirectionStatic;
variable SortIndicator
const SortIndicator: React.FunctionComponent<{ sortDirection?: SortDirectionType | undefined;}>;
Functions
function createMasonryCellPositioner
createMasonryCellPositioner: (params: createCellPositionerParams) => Positioner;
function createTableMultiSort
createTableMultiSort: ( sortCallback: (params: { sortBy: string; sortDirection: SortDirectionType; }) => void, options?: MultiSortOptions) => MultiSortReturn;
function defaultTableHeaderRenderer
defaultTableHeaderRenderer: () => Array<React.ReactElement<TableHeaderProps>>;
Classes
class ArrowKeyStepper
class ArrowKeyStepper extends PureComponent<ArrowKeyStepperProps, ScrollIndices> {}
property defaultProps
static defaultProps: { disabled: false; isControlled: false; mode: 'edges'; scrollToColumn: 0; scrollToRow: 0;};
class AutoSizer
class AutoSizer extends PureComponent<AutoSizerProps, Size> {}
Decorator component that automatically adjusts the width and height of a single child. Child component should not be declared as a child but should rather be specified by a
ChildComponent
property. All other properties will be passed through to the child component.
constructor
constructor(props: AutoSizerProps);
property defaultProps
static defaultProps: { onResize: () => void; disableHeight: false; disableWidth: false; style: {};};
method componentDidMount
componentDidMount: () => void;
method componentWillUnmount
componentWillUnmount: () => void;
method render
render: () => JSX.Element;
class CellMeasurer
class CellMeasurer extends PureComponent<CellMeasurerProps> {}
Wraps a cell and measures its rendered content. Measurements are stored in a per-cell cache. Cached-content is not be re-measured.
class CellMeasurerCache
class CellMeasurerCache implements CellMeasurerCacheInterface {}
constructor
constructor(params?: CellMeasurerCacheParams);
property columnWidth
columnWidth: (params: { index: number }) => number;
property defaultHeight
readonly defaultHeight: number;
property defaultWidth
readonly defaultWidth: number;
property rowHeight
rowHeight: (params: { index: number }) => number;
method clear
clear: (rowIndex: number, columnIndex: number) => void;
method clearAll
clearAll: () => void;
method getHeight
getHeight: (rowIndex: number, columnIndex: number) => number;
method getWidth
getWidth: (rowIndex: number, columnIndex: number) => number;
method has
has: (rowIndex: number, columnIndex: number) => boolean;
method hasFixedHeight
hasFixedHeight: () => boolean;
method hasFixedWidth
hasFixedWidth: () => boolean;
method set
set: ( rowIndex: number, columnIndex: number, width: number, height: number) => void;
class Collection
class Collection extends PureComponent<CollectionProps> {}
Renders scattered or non-linear data. Unlike Grid, which renders checkerboard data, Collection can render arbitrarily positioned- even overlapping- data.
property defaultProps
static defaultProps: { 'aria-label': 'grid'; cellGroupRenderer: CollectionCellGroupRenderer;};
property propTypes
static propTypes: { 'aria-label': PropTypes.Requireable<string>; cellCount: PropTypes.Validator<number>; cellGroupRenderer: PropTypes.Validator<CollectionCellGroupRenderer>; cellRenderer: PropTypes.Validator<CollectionCellRenderer>; cellSizeAndPositionGetter: PropTypes.Validator<CollectionCellSizeAndPositionGetter>; sectionSize: PropTypes.Requireable<number>;};
method calculateSizeAndPositionData
calculateSizeAndPositionData: () => void;
CellLayoutManager interface
method cellRenderers
cellRenderers: ( params: { isScrolling: boolean } & SizeInfo) => React.ReactNode[];
method forceUpdate
forceUpdate: () => void;
method getLastRenderedIndices
getLastRenderedIndices: () => number[];
Returns the most recently rendered set of cell indices.
method getScrollPositionForCell
getScrollPositionForCell: (params: { align: 'auto' | 'start' | 'end' | 'center'; cellIndex: number; height: number; scrollLeft: number; scrollTop: number; width: number;}) => ScrollPosition;
Calculates the minimum amount of change from the current scroll position to ensure the specified cell is (fully) visible.
method getTotalSize
getTotalSize: () => SizeInfo;
method recomputeCellSizesAndPositions
recomputeCellSizesAndPositions: () => void;
See Collection#recomputeCellSizesAndPositions
class Column
class Column extends Component<ColumnProps> {}
property defaultProps
static defaultProps: { cellDataGetter: TableCellDataGetter; cellRenderer: TableCellRenderer; flexGrow: 0; flexShrink: 1; headerRenderer: TableHeaderRenderer; style: {};};
property propTypes
static propTypes: { 'aria-label': PropTypes.Requireable<string>; cellDataGetter: PropTypes.Requireable<TableCellDataGetter>; cellRenderer: PropTypes.Requireable<TableCellRenderer>; className: PropTypes.Requireable<string>; columnData: PropTypes.Requireable<object>; dataKey: PropTypes.Validator<string>; disableSort: PropTypes.Requireable<boolean>; flexGrow: PropTypes.Requireable<number>; flexShrink: PropTypes.Requireable<number>; headerClassName: PropTypes.Requireable<string>; headerRenderer: PropTypes.Validator<TableHeaderRowRenderer>; label: PropTypes.Requireable<string>; maxWidth: PropTypes.Requireable<number>; minWidth: PropTypes.Requireable<number>; style: PropTypes.Requireable<React.CSSProperties>; width: PropTypes.Validator<number>; id: PropTypes.Requireable<string>;};
class ColumnSizer
class ColumnSizer extends PureComponent<ColumnSizerProps> {}
High-order component that auto-calculates column-widths for
Grid
cells.
property propTypes
static propTypes: { children: PropTypes.Validator<(props: SizedColumnProps) => React.ReactNode>; columnMaxWidth: PropTypes.Requireable<number>; columnMinWidth: PropTypes.Requireable<number>; columnCount: PropTypes.Validator<number>; width: PropTypes.Validator<number>;};
class Grid
class Grid extends PureComponent<GridProps, GridState> {}
Renders tabular data with virtualization along the vertical and horizontal axes. Row heights and column widths must be known ahead of time and specified as properties.
property defaultProps
static defaultProps: { 'aria-label': 'grid'; 'aria-readonly': true; autoContainerWidth: false; autoHeight: false; autoWidth: false; cellRangeRenderer: GridCellRangeRenderer; containerRole: 'rowgroup'; containerStyle: {}; estimatedColumnSize: 100; estimatedRowSize: 30; getScrollbarSize: () => number; noContentRenderer: () => React.ReactNode; onScroll: () => void; onScrollbarPresenceChange: () => void; onSectionRendered: () => void; overscanColumnCount: 0; overscanIndicesGetter: OverscanIndicesGetter; overscanRowCount: 10; role: 'grid'; scrollingResetTimeInterval: typeof DEFAULT_SCROLLING_RESET_TIME_INTERVAL; scrollToAlignment: 'auto'; scrollToColumn: -1; scrollToRow: -1; style: {}; tabIndex: 0;};
method getOffsetForCell
getOffsetForCell: (params?: { alignment?: Alignment | undefined; columnIndex?: number | undefined; rowIndex?: number | undefined;}) => ScrollOffset;
Gets offsets for a given cell and alignment.
method handleScrollEvent
handleScrollEvent: (params: Partial<ScrollOffset>) => void;
This method handles a scroll event originating from an external scroll control. It's an advanced method and should probably not be used unless you're implementing a custom scroll-bar solution.
method invalidateCellSizeAfterRender
invalidateCellSizeAfterRender: (params: { columnIndex: number; rowIndex: number;}) => void;
Invalidate Grid size and recompute visible cells. This is a deferred wrapper for recomputeGridSize(). It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders. This method is intended for advanced use-cases like CellMeasurer.
method measureAllCells
measureAllCells: () => void;
Pre-measure all columns and rows in a Grid. Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured. This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one).
method recomputeGridSize
recomputeGridSize: (params?: { columnIndex?: number | undefined; rowIndex?: number | undefined;}) => void;
Forced recompute of row heights and column widths. This function should be called if dynamic column or row sizes have changed but nothing else has. Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes.
method scrollToCell
scrollToCell: (params: { columnIndex: number; rowIndex: number }) => void;
Ensure column and row are visible.
method scrollToPosition
scrollToPosition: (params?: { scrollLeft: number; scrollTop: number }) => void;
Scroll to the specified offset(s). Useful for animating position changes.
class InfiniteLoader
class InfiniteLoader extends PureComponent<InfiniteLoaderProps> {}
Higher-order component that manages lazy-loading for "infinite" data. This component decorates a virtual component and just-in-time prefetches rows as a user scrolls. It is intended as a convenience component; fork it if you'd like finer-grained control over data-loading.
property defaultProps
static defaultProps: { minimumBatchSize: 10; rowCount: 0; threshold: 15 };
property propTypes
static propTypes: { children: PropTypes.Validator< (props: InfiniteLoaderChildProps) => React.ReactNode >; isRowLoaded: PropTypes.Validator<(params: Index) => boolean>; loadMoreRows: PropTypes.Validator<(params: IndexRange) => Promise<any>>; minimumBatchSize: PropTypes.Validator<number>; rowCount: PropTypes.Validator<number>; threshold: PropTypes.Validator<number>;};
method resetLoadMoreRowsCache
resetLoadMoreRowsCache: (autoReload?: boolean) => void;
class List
class List extends PureComponent<ListProps> {}
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.
property defaultProps
static defaultProps: { autoHeight: false; estimatedRowSize: 30; onScroll: () => void; noRowsRenderer: () => null; onRowsRendered: () => void; overscanIndicesGetter: OverscanIndicesGetter; overscanRowCount: 10; scrollToAlignment: 'auto'; scrollToIndex: -1; style: {};};
property Grid
Grid?: Grid;
method forceUpdateGrid
forceUpdateGrid: () => void;
method getOffsetForRow
getOffsetForRow: (params: { alignment?: Alignment | undefined; index?: number | undefined;}) => number;
See Grid#getOffsetForCell
method invalidateCellSizeAfterRender
invalidateCellSizeAfterRender: ({ columnIndex, rowIndex }: CellPosition) => void;
CellMeasurer compatibility
method measureAllRows
measureAllRows: () => void;
See Grid#measureAllCells
method recomputeGridSize
recomputeGridSize: (params?: Partial<CellPosition>) => void;
CellMeasurer compatibility
method recomputeRowHeights
recomputeRowHeights: (index?: number) => void;
See Grid#recomputeGridSize
method scrollToPosition
scrollToPosition: (scrollTop?: number) => void;
See Grid#scrollToPosition
method scrollToRow
scrollToRow: (index?: number) => void;
See Grid#scrollToCell
class Masonry
class Masonry extends PureComponent<MasonryProps, MasonryState> {}
This component efficiently displays arbitrarily positioned cells using windowing techniques. Cell position is determined by an injected
cellPositioner
property. Windowing is vertical; this component does not support horizontal scrolling.Rendering occurs in two phases: 1) First pass uses estimated cell sizes (provided by the cache) to determine how many cells to measure in a batch. Batch size is chosen using a fast, naive layout algorithm that stacks images in order until the viewport has been filled. After measurement is complete (componentDidMount or componentDidUpdate) this component evaluates positioned cells in order to determine if another measurement pass is required (eg if actual cell sizes were less than estimated sizes). All measurements are permanently cached (keyed by
keyMapper
) for performance purposes. 2) Second pass uses the externalcellPositioner
to layout cells. At this time the positioner has access to cached size measurements for all cells. The positions it returns are cached by Masonry for fast access later. Phase one is repeated if the user scrolls beyond the current layout's bounds. If the layout is invalidated due to eg a resize, cached positions can be cleared usingrecomputeCellPositions()
.Animation constraints: Simple animations are supported (eg translate/slide into place on initial reveal). More complex animations are not (eg flying from one position to another on resize).
Layout constraints: This component supports multi-column layout. The height of each item may vary. The width of each item must not exceed the width of the column it is "in". The left position of all items within a column must align. (Items may not span multiple columns.)
property defaultProps
static defaultProps: { autoHeight: false; keyMapper: identity; onCellsRendered: noop; onScroll: noop; overscanByPixels: 20; role: 'grid'; scrollingResetTimeInterval: typeof DEFAULT_SCROLLING_RESET_TIME_INTERVAL; style: emptyObject; tabIndex: 0;};
method clearCellPositions
clearCellPositions: () => void;
method getDerivedStateFromProps
static getDerivedStateFromProps: ( nextProps: MasonryProps, prevState: MasonryState) => MasonryState | null;
method invalidateCellSizeAfterRender
invalidateCellSizeAfterRender: (params: { rowIndex: number }) => void;
method recomputeCellPositions
recomputeCellPositions: () => void;
class MultiGrid
class MultiGrid extends PureComponent<MultiGridProps, MultiGridState> {}
Renders 1, 2, or 4 Grids depending on configuration. A main (body) Grid will always be rendered. Optionally, 1-2 Grids for sticky header rows will also be rendered. If no sticky columns, only 1 sticky header Grid will be rendered. If sticky columns, 2 sticky header Grids will be rendered.
property defaultProps
static defaultProps: { classNameBottomLeftGrid: ''; classNameBottomRightGrid: ''; classNameTopLeftGrid: ''; classNameTopRightGrid: ''; enableFixedColumnScroll: false; enableFixedRowScroll: false; fixedColumnCount: 0; fixedRowCount: 0; scrollToColumn: -1; scrollToRow: -1; style: {}; styleBottomLeftGrid: {}; styleBottomRightGrid: {}; styleTopLeftGrid: {}; styleTopRightGrid: {};};
property propTypes
static propTypes: { classNameBottomLeftGrid: PropTypes.Validator<string>; classNameBottomRightGrid: PropTypes.Validator<string>; classNameTopLeftGrid: PropTypes.Validator<string>; classNameTopRightGrid: PropTypes.Validator<string>; enableFixedColumnScroll: PropTypes.Validator<boolean>; enableFixedRowScroll: PropTypes.Validator<boolean>; fixedColumnCount: PropTypes.Validator<number>; fixedRowCount: PropTypes.Validator<number>; style: PropTypes.Validator<React.CSSProperties>; styleBottomLeftGrid: PropTypes.Validator<React.CSSProperties>; styleBottomRightGrid: PropTypes.Validator<React.CSSProperties>; styleTopLeftGrid: PropTypes.Validator<React.CSSProperties>; styleTopRightGrid: PropTypes.Validator<React.CSSProperties>;};
method forceUpdateGrids
forceUpdateGrids: () => void;
method getDerivedStateFromProps
static getDerivedStateFromProps: ( nextProps: MultiGridProps, prevState: MultiGridState) => MultiGridState | null;
method invalidateCellSizeAfterRender
invalidateCellSizeAfterRender: (params?: Partial<CellPosition>) => void;
See Grid#invalidateCellSizeAfterRender
method measureAllCells
measureAllCells: () => void;
See Grid#measureAllCells
method recomputeGridSize
recomputeGridSize: (params?: { columnIndex?: number | undefined; rowIndex?: number | undefined;}) => void;
See Grid#recomputeGridSize
class ScrollSync
class ScrollSync extends PureComponent<ScrollSyncProps, ScrollSyncState> {}
HOC that simplifies the process of synchronizing scrolling between two or more virtualized components.
property propTypes
static propTypes: { children: PropTypes.Validator< (props: ScrollSyncChildProps) => React.ReactNode >;};
class Table
class Table extends PureComponent<TableProps> {}
Table component with fixed headers and virtualized rows for improved performance with large data sets. This component expects explicit width, height, and padding parameters.
property defaultProps
static defaultProps: { disableHeader: false; estimatedRowSize: 30; headerHeight: 0; headerStyle: {}; noRowsRenderer: () => null; onRowsRendered: () => null; onScroll: () => null; overscanRowCount: 10; rowRenderer: TableRowRenderer; headerRowRenderer: TableHeaderRowRenderer; rowStyle: {}; scrollToAlignment: 'auto'; scrollToIndex: -1; style: {};};
property Grid
Grid: Grid;
property propTypes
static propTypes: { 'aria-label': PropTypes.Requireable<string>; autoHeight: PropTypes.Requireable<boolean>; children: PropTypes.Validator<Column>; className: PropTypes.Requireable<string>; disableHeader: PropTypes.Requireable<boolean>; estimatedRowSize: PropTypes.Validator<number>; gridClassName: PropTypes.Requireable<string>; gridStyle: PropTypes.Requireable<React.CSSProperties>; headerClassName: PropTypes.Requireable<string>; headerHeight: PropTypes.Validator<number>; headerRowRenderer: PropTypes.Requireable<TableHeaderRowRenderer>; headerStyle: PropTypes.Requireable<React.CSSProperties>; height: PropTypes.Validator<number>; id: PropTypes.Requireable<string>; noRowsRenderer: PropTypes.Requireable<() => JSX.Element>; onHeaderClick: PropTypes.Requireable< (params: HeaderMouseEventHandlerParams) => void >; onRowClick: PropTypes.Requireable< (params: RowMouseEventHandlerParams) => void >; onRowDoubleClick: PropTypes.Requireable< (params: RowMouseEventHandlerParams) => void >; onRowMouseOut: PropTypes.Requireable< (params: RowMouseEventHandlerParams) => void >; onRowMouseOver: PropTypes.Requireable< (params: RowMouseEventHandlerParams) => void >; onRowsRendered: PropTypes.Requireable< (params: IndexRange & OverscanIndexRange) => void >; onScroll: PropTypes.Requireable<(params: ScrollEventData) => void>; overscanRowCount: PropTypes.Validator<number>; rowClassName: PropTypes.Requireable<string | ((params: Index) => string)>; rowGetter: PropTypes.Validator<(params: Index) => any>; rowHeight: PropTypes.Validator<number | ((params: Index) => number)>; rowCount: PropTypes.Validator<number>; rowRenderer: PropTypes.Requireable< (props: TableRowProps) => React.ReactNode >; rowStyle: PropTypes.Validator<any>; scrollToAlignment: PropTypes.Validator<Alignment>; scrollToIndex: PropTypes.Validator<number>; scrollTop: PropTypes.Requireable<number>; sort: PropTypes.Requireable< (params: { sortBy: string; sortDirection: SortDirectionType }) => void >; sortBy: PropTypes.Requireable<string>; sortDirection: PropTypes.Validator<SortDirectionType>; style: PropTypes.Requireable<React.CSSProperties>; tabIndex: PropTypes.Requireable<number>; width: PropTypes.Validator<number>;};
method forceUpdateGrid
forceUpdateGrid: () => void;
method getOffsetForRow
getOffsetForRow: (params: { alignment?: Alignment | undefined; index?: number | undefined;}) => number;
See Grid#getOffsetForCell
method getScrollbarWidth
getScrollbarWidth: () => number;
method measureAllRows
measureAllRows: () => void;
See Grid#measureAllCells
method recomputeRowHeights
recomputeRowHeights: (index?: number) => void;
See Grid#recomputeGridSize
method scrollToPosition
scrollToPosition: (scrollTop?: number) => void;
See Grid#scrollToPosition
method scrollToRow
scrollToRow: (index?: number) => void;
See Grid#scrollToCell
class WindowScroller
class WindowScroller extends PureComponent< WindowScrollerProps, WindowScrollerState> {}
property defaultProps
static defaultProps: { onResize: () => void; onScroll: () => void; scrollingResetTimeInterval: typeof IS_SCROLLING_TIMEOUT; scrollElement: Window | undefined; serverHeight: 0; serverWidth: 0;};
method updatePosition
updatePosition: (scrollElement?: HTMLElement) => void;
Type Aliases
type Alignment
type Alignment = 'auto' | 'end' | 'start' | 'center';
type ArrowKeyStepperChildProps
type ChildProps = { onSectionRendered: (params: RenderedSection) => void; scrollToColumn: number; scrollToRow: number;};
type ArrowKeyStepperProps
type ArrowKeyStepperProps = { children: (props: ChildProps) => React.ReactNode; className?: string | undefined; columnCount: number; rowCount: number; mode?: 'edges' | 'cells' | undefined; disabled?: boolean | undefined; isControlled?: boolean | undefined; onScrollToChange?: ((params: ScrollIndices) => void) | undefined; scrollToColumn?: number | undefined; scrollToRow?: number | undefined; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time.
type AutoSizerProps
type AutoSizerProps = { /** * Function responsible for rendering children. * This function should implement the following signature: * ({ height, width }) => PropTypes.element */ children: (props: Size) => React.ReactNode; /** * Optional custom CSS class name to attach to root AutoSizer element. * This is an advanced property and is not typically necessary. */ className?: string | undefined; /** * Height passed to child for initial render; useful for server-side rendering. * This value will be overridden with an accurate height after mounting. */ defaultHeight?: number | undefined; /** * Width passed to child for initial render; useful for server-side rendering. * This value will be overridden with an accurate width after mounting. */ defaultWidth?: number | undefined; /** Disable dynamic :height property */ disableHeight?: boolean | undefined; /** Disable dynamic :width property */ disableWidth?: boolean | undefined; /** Nonce of the inlined stylesheet for Content Security Policy */ nonce?: string | undefined; /** Callback to be invoked on-resize: ({ height, width }) */ onResize?: ((info: Size) => any) | undefined; /** * Optional custom inline style to attach to root AutoSizer element. * This is an advanced property and is not typically necessary. */ style?: React.CSSProperties | undefined; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type CellMeasurerCacheParams
type CellMeasurerCacheParams = { defaultHeight?: number | undefined; defaultWidth?: number | undefined; fixedHeight?: boolean | undefined; fixedWidth?: boolean | undefined; minHeight?: number | undefined; minWidth?: number | undefined; keyMapper?: KeyMapper | undefined;};
type CellMeasurerProps
type CellMeasurerProps = { cache: CellMeasurerCacheInterface; children: ((props: CellMeasurerChildProps) => React.ReactNode) | React.ReactNode; columnIndex?: number | undefined; index?: number | undefined; parent: MeasuredCellParent; rowIndex?: number | undefined; style?: React.CSSProperties | undefined; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type CellRenderer
type CellRenderer = (props: MasonryCellProps) => React.ReactNode;
type CellSizeAndPositionManager
type CellSizeAndPositionManager = { areOffsetsAdjusted(): boolean; configure({ cellCount, estimatedCellSize }: ConfigureParams): void; getCellCount(): number; getEstimatedCellSize(): number; getLastMeasuredIndex(): number; getOffsetAdjustment({ containerSize, offset /*safe*/, }: ContainerSizeAndOffset): number; /** * This method returns the size and position for the cell at the specified index. * It just-in-time calculates (or used cached values) for cells leading up to the index. */ getSizeAndPositionOfCell(index: number): SizeAndPositionData; getSizeAndPositionOfLastMeasuredCell(): SizeAndPositionData; /** * Total size of all cells being measured. * This value will be completedly estimated initially. * As cells as measured the estimate will be updated. */ getTotalSize(): number; /** * Determines a new offset that ensures a certain cell is visible, given the current offset. * If the cell is already visible then the current offset will be returned. * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible. * * @param align Desired alignment within container; one of "auto" (default), "start", or "end" * @param containerSize Size (width or height) of the container viewport * @param currentOffset Container's current (x or y) offset * @param totalSize Total size (width or height) of all cells * @return Offset to use to ensure the specified cell is visible */ getUpdatedOffsetForIndex(params: { align: string; containerSize: number; currentOffset: number; targetIndex: number; }): number; getVisibleCellRange(params: GetVisibleCellRangeParams): VisibleCellRange; /** * Clear all cached values for cells after the specified index. * This method should be called for any cell that has changed its size. * It will not immediately perform any calculations; they'll be performed the next time getSizeAndPositionOfCell() is called. */ resetCell(index: number): void;};
type CollectionCellGroupRenderer
type CollectionCellGroupRenderer = ( params: CollectionCellGroupRendererParams) => React.ReactNode[];
type CollectionCellGroupRendererParams
type CollectionCellGroupRendererParams = { cellSizeAndPositionGetter: CollectionCellSizeAndPositionGetter; indices: number[]; cellRenderer: CollectionCellRenderer;};
type CollectionCellRenderer
type CollectionCellRenderer = ( params: CollectionCellRendererParams) => React.ReactNode;
type CollectionCellRendererParams
type CollectionCellRendererParams = { index: number; isScrolling: boolean; key: number; style: React.CSSProperties;};
type CollectionCellSizeAndPosition
type CollectionCellSizeAndPosition = { height: number; width: number; x: number; y: number;};
type CollectionCellSizeAndPositionGetter
type CollectionCellSizeAndPositionGetter = ( params: Index) => CollectionCellSizeAndPosition;
type CollectionProps
type CollectionProps = { 'aria-label'?: string | undefined; /** * Outer height of Collection is set to "auto". This property should only be * used in conjunction with the WindowScroller HOC. */ autoHeight?: boolean | undefined; /** * Number of cells in Collection. */ cellCount: number; /** * Responsible for rendering a group of cells given their indices. * Should implement the following interface: ({ * cellSizeAndPositionGetter:Function, * indices: Array<number>, * cellRenderer: Function * }): Array<PropTypes.node> */ cellGroupRenderer?: CollectionCellGroupRenderer | undefined; /** * Responsible for rendering a cell given an row and column index. * Should implement the following interface: ({ index: number, key: string, style: object }): PropTypes.element */ cellRenderer: CollectionCellRenderer; /** * Callback responsible for returning size and offset/position information for a given cell (index). * ({ index: number }): { height: number, width: number, x: number, y: number } */ cellSizeAndPositionGetter: CollectionCellSizeAndPositionGetter; /** * Optional custom CSS class name to attach to root Collection element. */ className?: string | undefined; height: number; horizontalOverscanSize?: number | undefined; /** * Optional custom id to attach to root Collection element. */ id?: string | undefined; noContentRenderer?: (() => JSX.Element) | undefined; /** * Callback invoked whenever the scroll offset changes within the inner * scrollable region: ({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }): void */ onScroll?: ((params: ScrollParams) => any) | undefined; /** * Callback invoked with information about the section of the Collection * that was just rendered: ({ indices: Array<number> }): void */ onSectionRendered?: ((params: SectionRenderedParams) => any) | undefined; /** * Horizontal offset */ scrollLeft?: number | undefined; /** * Controls the alignment of scrolled-to-cells. The default ("auto") scrolls * the least amount possible to ensure that the specified cell is fully * visible. Use "start" to always align cells to the top/left of the * Collection and "end" to align them bottom/right. Use "center" to align * specified cell in the middle of container. */ scrollToAlignment?: Alignment | undefined; scrollToCell?: number | undefined; /** * Vertical Offset */ scrollTop?: number | undefined; /** * Optionally override the size of the sections a Collection's cells are split into. */ sectionSize?: number | undefined; /** * Optional custom inline style to attach to root Collection element. */ style?: React.CSSProperties | undefined; verticalOverscanSize?: number | undefined; /** * Width of Collection; this property determines the number of visible * (vs virtualized) columns. */ width: number; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type ColumnProps
type ColumnProps = { /** Optional aria-label value to set on the column header */ 'aria-label'?: string | undefined; /** * Callback responsible for returning a cell's data, given its :dataKey * ({ columnData: any, dataKey: string, rowData: any }): any */ cellDataGetter?: TableCellDataGetter | undefined; /** * Callback responsible for rendering a cell's contents. * ({ cellData: any, columnData: any, dataKey: string, rowData: any, rowIndex: number }): node */ cellRenderer?: TableCellRenderer | undefined; /** Optional CSS class to apply to cell */ className?: string | undefined; /** Optional additional data passed to this column's :cellDataGetter */ columnData?: any; /** Uniquely identifies the row-data attribute correspnding to this cell */ dataKey: any; /** Default sort order when clicked for the first time. Valid options include "ASC" and "DESC". Defaults to "ASC" */ defaultSortDirection?: SortDirectionType | undefined; /** If sort is enabled for the table at large, disable it for this column */ disableSort?: boolean | undefined; /** Flex grow style; defaults to 0 */ flexGrow?: number | undefined; /** Flex shrink style; defaults to 1 */ flexShrink?: number | undefined; /** Optional CSS class to apply to this column's header */ headerClassName?: string | undefined; /** * Optional callback responsible for rendering a column header contents. * ({ columnData: object, dataKey: string, disableSort: boolean, label: string, sortBy: string, sortDirection: string }): PropTypes.node */ headerRenderer?: TableHeaderRenderer | undefined; /** Optional inline style to apply to this column's header */ headerStyle?: React.CSSProperties | undefined; /** Optional id to set on the column header; used for aria-describedby */ id?: string | undefined; /** Header label for this column */ label?: ReactNode | undefined; /** Maximum width of column; this property will only be used if :flexGrow is > 0. */ maxWidth?: number | undefined; /** Minimum width of column. */ minWidth?: number | undefined; /** Optional inline style to apply to cell */ style?: React.CSSProperties | undefined; /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */ width: number;};
type ColumnSizerProps
type ColumnSizerProps = { /** * Function responsible for rendering a virtualized Grid. * This function should implement the following signature: * ({ adjustedWidth, getColumnWidth, registerChild }) => PropTypes.element * * The specified :getColumnWidth function should be passed to the Grid's :columnWidth property. * The :registerChild should be passed to the Grid's :ref property. * The :adjustedWidth property is optional; it reflects the lesser of the overall width or the width of all columns. */ children: (props: SizedColumnProps) => React.ReactNode; /** Optional maximum allowed column width */ columnMaxWidth?: number | undefined; /** Optional minimum allowed column width */ columnMinWidth?: number | undefined; /** Number of columns in Grid or Table child */ columnCount?: number | undefined; /** Width of Grid or Table child */ width: number; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type ConfigureParams
type ConfigureParams = { cellCount: number; estimatedCellSize: number;};
type ContainerSizeAndOffset
type ContainerSizeAndOffset = { containerSize: number; offset: number;};
type Dimensions
type Dimensions = Size;
type GetVisibleCellRangeParams
type GetVisibleCellRangeParams = { containerSize: number; offset: number;};
type GridCellProps
type GridCellProps = { columnIndex: number; isScrolling: boolean; isVisible: boolean; key: string; parent: React.Component<GridCoreProps> & MeasuredCellParent; rowIndex: number; style: React.CSSProperties;};
type GridCellRangeProps
type GridCellRangeProps = { cellCache: Map<any>; cellRenderer: GridCellRenderer; columnSizeAndPositionManager: CellSizeAndPositionManager; columnStartIndex: number; columnStopIndex: number; isScrolling: boolean; isScrollingOptOut: boolean; rowSizeAndPositionManager: CellSizeAndPositionManager; rowStartIndex: number; rowStopIndex: number; scrollLeft: number; scrollTop: number; deferredMeasurementCache: CellMeasurerCache; horizontalOffsetAdjustment: number; parent: React.Component<GridCoreProps> & MeasuredCellParent; styleCache: Map<React.CSSProperties>; verticalOffsetAdjustment: number; visibleColumnIndices: VisibleCellRange; visibleRowIndices: VisibleCellRange;};
type GridCellRangeRenderer
type GridCellRangeRenderer = (params: GridCellRangeProps) => React.ReactNode[];
type GridCellRenderer
type GridCellRenderer = (props: GridCellProps) => React.ReactNode;
type GridProps
type GridProps = GridCoreProps & { /** * Responsible for rendering a cell given an row and column index. * Should implement the following interface: ({ columnIndex: number, rowIndex: number }): PropTypes.node */ cellRenderer: GridCellRenderer; /** * Number of columns in grid. */ columnCount: number; /** * Either a fixed column width (number) or a function that returns the width of a column given its index. * Should implement the following interface: (index: number): number */ columnWidth: number | ((params: Index) => number);};
type GridState
type GridState = { isScrolling: boolean; scrollDirectionHorizontal: ScrollDirection; scrollDirectionVertical: ScrollDirection; scrollLeft: number; scrollTop: number;};
type HeaderMouseEventHandlerParams
type HeaderMouseEventHandlerParams = { dataKey: string; columnData: any; event: React.MouseEvent<any>;};
type Index
type Index = { index: number;};
type IndexRange
type IndexRange = { startIndex: number; stopIndex: number;};
type InfiniteLoaderChildProps
type InfiniteLoaderChildProps = { onRowsRendered: (params: IndexRange) => void; registerChild: (registeredChild: any) => void;};
type InfiniteLoaderProps
type InfiniteLoaderProps = { /** * Function responsible for rendering a virtualized component. * This function should implement the following signature: * ({ onRowsRendered, registerChild }) => PropTypes.element * * The specified :onRowsRendered function should be passed through to the child's :onRowsRendered property. * The :registerChild callback should be set as the virtualized component's :ref. */ children: (props: InfiniteLoaderChildProps) => React.ReactNode; /** * Function responsible for tracking the loaded state of each row. * It should implement the following signature: ({ index: number }): boolean */ isRowLoaded: (params: Index) => boolean; /** * Callback to be invoked when more rows must be loaded. * It should implement the following signature: ({ startIndex, stopIndex }): Promise * The returned Promise should be resolved once row data has finished loading. * It will be used to determine when to refresh the list with the newly-loaded data. * This callback may be called multiple times in reaction to a single scroll event. */ loadMoreRows: (params: IndexRange) => Promise<any>; /** * Minimum number of rows to be loaded at a time. * This property can be used to batch requests to reduce HTTP requests. */ minimumBatchSize?: number | undefined; /** * Number of rows in list; can be arbitrary high number if actual number is unknown. */ rowCount?: number | undefined; /** * Threshold at which to pre-fetch data. * A threshold X means that data will start loading when a user scrolls within X rows. * This value defaults to 15. */ threshold?: number | undefined; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type KeyMapper
type KeyMapper = (rowIndex: number, columnIndex: number) => any;
type ListProps
type ListProps = GridCoreProps & { /** Optional renderer to be used in place of rows when rowCount is 0 */ noRowsRenderer?: (() => JSX.Element) | undefined; /** * Callback invoked with information about the slice of rows that were just rendered. * ({ startIndex, stopIndex }): void */ onRowsRendered?: ((info: RenderedRows) => void) | undefined; /** Responsible for rendering a row given an index; ({ index: number }): node */ rowRenderer: ListRowRenderer; /** Row index to ensure visible (by forcefully scrolling if necessary) */ scrollToIndex?: number | undefined;};
type ListRowProps
type ListRowProps = Pick<GridCellProps, Exclude<keyof GridCellProps, 'rowIndex'>> & { index: GridCellProps['rowIndex'];};
type ListRowRenderer
type ListRowRenderer = (props: ListRowProps) => React.ReactNode;
type Map
type Map<T> = { [key: string]: T };
type MasonryCellProps
type MasonryCellProps = { index: number; isScrolling: boolean; key: React.Key; parent: MeasuredCellParent; style?: React.CSSProperties | undefined;};
type MasonryProps
type MasonryProps = { autoHeight: boolean; cellCount: number; cellMeasurerCache: CellMeasurerCacheInterface; cellPositioner: Positioner; cellRenderer: CellRenderer; className?: string | undefined; height: number; id?: string | undefined; keyMapper?: KeyMapper | undefined; onCellsRendered?: OnCellsRenderedCallback | undefined; onScroll?: OnScrollCallback | undefined; overscanByPixels?: number | undefined; role?: string | undefined; scrollingResetTimeInterval?: number | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | null | undefined; width: number; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type MasonryState
type MasonryState = { isScrolling: boolean; scrollTop: number;};
type MultiGridProps
type MultiGridProps = { classNameBottomLeftGrid?: string | undefined; classNameBottomRightGrid?: string | undefined; classNameTopLeftGrid?: string | undefined; classNameTopRightGrid?: string | undefined; enableFixedColumnScroll?: boolean | undefined; enableFixedRowScroll?: boolean | undefined; fixedColumnCount?: number | undefined; fixedRowCount?: number | undefined; style?: React.CSSProperties | undefined; styleBottomLeftGrid?: React.CSSProperties | undefined; styleBottomRightGrid?: React.CSSProperties | undefined; styleTopLeftGrid?: React.CSSProperties | undefined; styleTopRightGrid?: React.CSSProperties | undefined;} & GridProps;
type MultiGridState
type MultiGridState = { scrollLeft: number; scrollTop: number;};
type OnCellsRenderedCallback
type OnCellsRenderedCallback = (params: IndexRange) => void;
type OnScrollCallback
type OnScrollCallback = (params: { clientHeight: number; scrollHeight: number; scrollTop: number;}) => void;
type OnScrollParams
type OnScrollParams = { clientHeight: number; clientWidth: number; scrollHeight: number; scrollLeft: number; scrollTop: number; scrollWidth: number;};
type OverscanIndexRange
type OverscanIndexRange = { overscanStartIndex: number; overscanStopIndex: number;};
type OverscanIndices
type OverscanIndices = OverscanIndexRange;
type OverscanIndicesGetterParams
type OverscanIndicesGetterParams = { direction?: SCROLL_DIRECTION_HORIZONTAL | SCROLL_DIRECTION_VERTICAL | undefined; cellCount: number; overscanCellsCount: number; scrollDirection: SCROLL_DIRECTION_BACKWARD | SCROLL_DIRECTION_FORWARD; startIndex: number; stopIndex: number;};
type Position
type Position = { left: number; top: number;};
type Positioner
type Positioner = ((index: number) => Position) & { reset: (params: resetParams) => void;};
type PositionInfo
type PositionInfo = { x: number; y: number;};
type RowMouseEventHandlerParams
type RowMouseEventHandlerParams = { rowData: any; index: number; event: React.MouseEvent<any>;};
type ScrollbarPresenceParams
type ScrollbarPresenceParams = { horizontal: boolean; size: number; vertical: boolean;};
type ScrollDirection
type ScrollDirection = 'horizontal' | 'vertical';
type ScrollEventData
type ScrollEventData = { clientHeight: number; scrollHeight: number; scrollTop: number;};
type ScrollIndices
type ScrollIndices = { scrollToRow: number; scrollToColumn: number;};
type ScrollParams
type ScrollParams = { clientHeight: number; clientWidth: number; scrollHeight: number; scrollLeft: number; scrollTop: number; scrollWidth: number;};
type ScrollPosition
type ScrollPosition = { scrollLeft: number; scrollTop: number;};
type ScrollSyncChildProps
type ScrollSyncChildProps = { clientHeight: number; clientWidth: number; onScroll: (params: OnScrollParams) => void; scrollHeight: number; scrollLeft: number; scrollTop: number; scrollWidth: number;};
type ScrollSyncProps
type ScrollSyncProps = { /** * Function responsible for rendering 2 or more virtualized components. * This function should implement the following signature: * ({ onScroll, scrollLeft, scrollTop }) => PropTypes.element */ children: (props: ScrollSyncChildProps) => React.ReactNode; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type ScrollSyncState
type ScrollSyncState = { clientHeight: number; clientWidth: number; scrollHeight: number; scrollLeft: number; scrollTop: number; scrollWidth: number;};
type SectionRenderedParams
type SectionRenderedParams = RenderedSection;
type Size
type Size = { height: number; width: number;};
type SizeAndPositionData
type SizeAndPositionData = { offset: number; size: number;};
type SizeAndPositionInfo
type SizeAndPositionInfo = SizeInfo & PositionInfo;
type SizedColumnProps
type SizedColumnProps = { adjustedWidth: number; columnWidth: number; getColumnWidth: () => number; registerChild: any;};
type SizeInfo
type SizeInfo = { height: number; width: number;};
type SortDirectionType
type SortDirectionType = 'ASC' | 'DESC';
type SortParams
type SortParams = { defaultSortDirection: SortDirectionType; event: MouseEvent; sortBy: string;};
type TableCellDataGetter
type TableCellDataGetter = (params: TableCellDataGetterParams) => any;
type TableCellDataGetterParams
type TableCellDataGetterParams = { columnData?: any; dataKey: string; rowData: any;};
type TableCellProps
type TableCellProps = { cellData?: any; columnData?: any; columnIndex: number; dataKey: string; isScrolling: boolean; parent?: any; rowData: any; rowIndex: number;};
type TableCellRenderer
type TableCellRenderer = (props: TableCellProps) => React.ReactNode;
type TableHeaderProps
type TableHeaderProps = { columnData?: any; dataKey: string; disableSort?: boolean | undefined; label?: ReactNode | undefined; sortBy?: string | undefined; sortDirection?: SortDirectionType | undefined;};
type TableHeaderRenderer
type TableHeaderRenderer = (props: TableHeaderProps) => React.ReactNode;
type TableHeaderRowProps
type TableHeaderRowProps = { className: string; columns: React.ReactNode[]; style: React.CSSProperties; scrollbarWidth: number; height: number; width: number;};
type TableHeaderRowRenderer
type TableHeaderRowRenderer = (props: TableHeaderRowProps) => React.ReactNode;
type TableProps
type TableProps = GridCoreProps & { 'aria-label'?: string | undefined; deferredMeasurementCache?: CellMeasurerCache | undefined; /** * Removes fixed height from the scrollingContainer so that the total height * of rows can stretch the window. Intended for use with WindowScroller */ autoHeight?: boolean | undefined; /** One or more Columns describing the data displayed in this row */ children?: React.ReactNode | undefined; /** Optional CSS class name */ className?: string | undefined; /** Disable rendering the header at all */ disableHeader?: boolean | undefined; /** * Used to estimate the total height of a Table before all of its rows have actually been measured. * The estimated total height is adjusted as rows are rendered. */ estimatedRowSize?: number | undefined; /** Optional custom CSS class name to attach to inner Grid element. */ gridClassName?: string | undefined; /** Optional inline style to attach to inner Grid element. */ gridStyle?: any; /** Optional CSS class to apply to all column headers */ headerClassName?: string | undefined; /** Fixed height of header row */ headerHeight: number; /** * Responsible for rendering a table row given an array of columns: * Should implement the following interface: ({ * className: string, * columns: any[], * style: any * }): PropTypes.node */ headerRowRenderer?: TableHeaderRowRenderer | undefined; /** Optional custom inline style to attach to table header columns. */ headerStyle?: any; /** Fixed/available height for out DOM element */ height?: number | undefined; /** Optional id */ id?: string | undefined; /** Optional renderer to be used in place of table body rows when rowCount is 0 */ noRowsRenderer?: (() => JSX.Element | null) | undefined; /** * Optional callback when a column's header is clicked. * ({ columnData: any, dataKey: string }): void */ onHeaderClick?: ((params: HeaderMouseEventHandlerParams) => void) | undefined; /** * Callback invoked when a user clicks on a table row. * ({ index: number }): void */ onRowClick?: ((info: RowMouseEventHandlerParams) => void) | undefined; /** * Callback invoked when a user double-clicks on a table row. * ({ index: number }): void */ onRowDoubleClick?: ((info: RowMouseEventHandlerParams) => void) | undefined; /** * Callback invoked when the mouse leaves a table row. * ({ index: number }): void */ onRowMouseOut?: ((info: RowMouseEventHandlerParams) => void) | undefined; /** * Callback invoked when a user moves the mouse over a table row. * ({ index: number }): void */ onRowMouseOver?: ((info: RowMouseEventHandlerParams) => void) | undefined; /** * Callback invoked with information about the slice of rows that were just rendered. * ({ startIndex, stopIndex }): void */ onRowsRendered?: ((info: IndexRange & OverscanIndexRange) => void) | undefined; /** * 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. * ({ clientHeight, scrollHeight, scrollTop }): void */ onScroll?: ((info: ScrollEventData) => void) | undefined; /** * 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 | undefined; /** * Optional CSS class to apply to all table rows (including the header row). * This property can be a CSS class name (string) or a function that returns a class name. * If a function is provided its signature should be: ({ index: number }): string */ rowClassName?: string | ((info: Index) => string) | undefined; /** * Callback responsible for returning a data row given an index. * ({ index: number }): any */ rowGetter?: ((info: Index) => any) | undefined; /** * Either a fixed row height (number) or a function that returns the height of a row given its index. * ({ index: number }): number */ rowHeight: number | ((info: Index) => number); /** Number of rows in table. */ rowCount: number; /** * Responsible for rendering a table row given an array of columns: * Should implement the following interface: ({ * className: string, * columns: Array, * index: number, * isScrolling: boolean, * onRowClick: ?Function, * onRowDoubleClick: ?Function, * onRowMouseOver: ?Function, * onRowMouseOut: ?Function, * rowData: any, * style: any * }): PropTypes.node */ rowRenderer?: TableRowRenderer | undefined; /** Optional custom inline style to attach to table rows. */ rowStyle?: | React.CSSProperties | ((info: Index) => React.CSSProperties) | undefined; /** See Grid#scrollToAlignment */ scrollToAlignment?: string | undefined; /** Row index to ensure visible (by forcefully scrolling if necessary) */ scrollToIndex?: number | undefined; /** Vertical offset. */ scrollTop?: number | undefined; /** * Sort function to be called if a sortable header is clicked. * ({ sortBy: string, sortDirection: SortDirection }): void */ sort?: | ((info: { sortBy: string; sortDirection: SortDirectionType }) => void) | undefined; /** Table data is currently sorted by this :dataKey (if it is sorted at all) */ sortBy?: string | undefined; /** Table data is currently sorted in this direction (if it is sorted at all) */ sortDirection?: SortDirectionType | undefined; /** Optional inline style */ style?: React.CSSProperties | undefined; /** Tab index for focus */ tabIndex?: number | null | undefined; /** Width of list */ width?: number | undefined;};
type TableRowProps
type TableRowProps = { className: string; columns: any[]; index: number; isScrolling: boolean; key: string; onRowClick?: ((params: RowMouseEventHandlerParams) => void) | undefined; onRowDoubleClick?: ((params: RowMouseEventHandlerParams) => void) | undefined; onRowMouseOver?: ((params: RowMouseEventHandlerParams) => void) | undefined; onRowMouseOut?: ((params: RowMouseEventHandlerParams) => void) | undefined; onRowRightClick?: ((params: RowMouseEventHandlerParams) => void) | undefined; rowData: any; style: any;};
type TableRowRenderer
type TableRowRenderer = (props: TableRowProps) => React.ReactNode;
type VisibleCellRange
type VisibleCellRange = { start: number; stop: number;};
type WindowScrollerChildProps
type WindowScrollerChildProps = { height: number; width: number; isScrolling: boolean; scrollTop: number; scrollLeft: number; onChildScroll: (params: { scrollTop: number }) => void; registerChild: (element?: React.ReactNode) => void;};
type WindowScrollerProps
type WindowScrollerProps = { /** * Function responsible for rendering children. * This function should implement the following signature: * ({ height, isScrolling, scrollLeft, scrollTop, width, onChildScroll }) => PropTypes.element */ children: (params: WindowScrollerChildProps) => React.ReactNode;
/** Callback to be invoked on-resize: ({ height, width }) */ onResize?: ((params: { height: number; width: number }) => void) | undefined;
/** Callback to be invoked on-scroll: ({ scrollLeft, scrollTop }) */ onScroll?: | ((params: { scrollLeft: number; scrollTop: number }) => void) | undefined;
/** Element to attach scroll event listeners. Defaults to window. */ scrollElement?: typeof window | Element | undefined; /** * Wait this amount of time after the last scroll event before resetting child `pointer-events`. */ scrollingResetTimeInterval?: number | undefined;
/** Height used for server-side rendering */ serverHeight?: number | undefined;
/** Width used for server-side rendering */ serverWidth?: number | undefined; /** * PLEASE NOTE * The [key: string]: any; line is here on purpose * This is due to the need of force re-render of PureComponent * Check the following link if you want to know more * https://github.com/bvaughn/react-virtualized#pass-thru-props */ [key: string]: any;};
type WindowScrollerState
type WindowScrollerState = { height: number; width: number; isScrolling: boolean; scrollLeft: number; scrollTop: number;};
Package Files (14)
- dist/es/ArrowKeyStepper.d.ts
- dist/es/AutoSizer.d.ts
- dist/es/CellMeasurer.d.ts
- dist/es/Collection.d.ts
- dist/es/ColumnSizer.d.ts
- dist/es/Grid.d.ts
- dist/es/InfiniteLoader.d.ts
- dist/es/List.d.ts
- dist/es/Masonry.d.ts
- dist/es/MultiGrid.d.ts
- dist/es/ScrollSync.d.ts
- dist/es/Table.d.ts
- dist/es/WindowScroller.d.ts
- index.d.ts
Dependencies (2)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/react-virtualized
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/react-virtualized)
- HTML<a href="https://www.jsdocs.io/package/@types/react-virtualized"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 5342 ms. - Missing or incorrect documentation? Open an issue for this package.