mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
update to react-virtualized 9.5 (#15613)
This commit is contained in:
parent
940b36aea4
commit
7aa9acc6b9
20
types/react-virtualized/dist/es/Grid.d.ts
vendored
20
types/react-virtualized/dist/es/Grid.d.ts
vendored
@ -126,16 +126,13 @@ export type GridCellRangeProps = {
|
||||
scrollTop: number
|
||||
}
|
||||
export type GridCellRangeRenderer = (params: GridCellRangeProps) => React.ReactNode[];
|
||||
// TODO add proper typing
|
||||
export type GridProps = {
|
||||
|
||||
export type GridCoreProps = {
|
||||
'aria-label'?: string;
|
||||
autoContainerWidth?: boolean;
|
||||
autoHeight?: boolean;
|
||||
cellRenderer: GridCellRenderer;
|
||||
cellRangeRenderer?: GridCellRangeRenderer;
|
||||
className?: string;
|
||||
columnCount: number;
|
||||
columnWidth: number | ((params: Index) => number);
|
||||
containerStyle?: React.CSSProperties;
|
||||
deferredMeasurementCache?: CellMeasurerCache;
|
||||
estimatedColumnSize?: number;
|
||||
@ -143,6 +140,7 @@ export type GridProps = {
|
||||
getScrollbarSize?: () => number;
|
||||
height: number;
|
||||
id?: string;
|
||||
isScrolling?: boolean,
|
||||
noContentRenderer?: () => React.ReactNode;
|
||||
onScroll?: (params: ScrollParams) => any;
|
||||
onSectionRendered?: (params: SectionRenderedParams) => any;
|
||||
@ -160,6 +158,12 @@ export type GridProps = {
|
||||
style?: React.CSSProperties;
|
||||
tabIndex?: number;
|
||||
width: number;
|
||||
}
|
||||
|
||||
export type GridProps = GridCoreProps & {
|
||||
cellRenderer: GridCellRenderer;
|
||||
columnCount: number;
|
||||
columnWidth: number | ((params: Index) => number);
|
||||
};
|
||||
|
||||
export type ScrollDirection = 'horizontal' | 'vertical';
|
||||
@ -274,6 +278,12 @@ export class Grid extends PureComponent<GridProps, GridState> {
|
||||
*/
|
||||
id: Requireable<string>,
|
||||
|
||||
/**
|
||||
* Override internal is-scrolling state tracking.
|
||||
* This property is primarily intended for use with the WindowScroller component.
|
||||
*/
|
||||
isScrolling: Requireable<boolean>,
|
||||
|
||||
/**
|
||||
* Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0.
|
||||
*/
|
||||
|
||||
4
types/react-virtualized/dist/es/List.d.ts
vendored
4
types/react-virtualized/dist/es/List.d.ts
vendored
@ -1,12 +1,12 @@
|
||||
import { PureComponent, Validator, Requireable } from 'react'
|
||||
import { Grid, GridCellProps } from './Grid'
|
||||
import { Grid, GridCoreProps, GridCellProps } from './Grid'
|
||||
import { Index, IndexRange, Alignment } from '../../index'
|
||||
import { CellMeasurerCache } from './CellMeasurer'
|
||||
|
||||
export type ListRowProps = GridCellProps & { index: number, style: React.CSSProperties };
|
||||
|
||||
export type ListRowRenderer = (props: ListRowProps) => React.ReactNode;
|
||||
export type ListProps = {
|
||||
export type ListProps = GridCoreProps & {
|
||||
deferredMeasurementCache?: CellMeasurerCache;
|
||||
className?: string;
|
||||
autoHeight?: boolean;
|
||||
|
||||
4
types/react-virtualized/dist/es/Table.d.ts
vendored
4
types/react-virtualized/dist/es/Table.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
import { Validator, Requireable, PureComponent, Component } from 'react';
|
||||
import { CellMeasurerCache } from './CellMeasurer';
|
||||
import { Index, Alignment, ScrollEventData, IndexRange, OverscanIndexRange } from '../../index';
|
||||
import { Grid } from './Grid';
|
||||
import { Grid, GridCoreProps } from './Grid';
|
||||
|
||||
export type TableCellDataGetterParams = {
|
||||
columnData?: any,
|
||||
@ -155,7 +155,7 @@ export type HeaderMouseEventHandlerParams = {
|
||||
}
|
||||
|
||||
// ref: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md
|
||||
export type TableProps = {
|
||||
export type TableProps = GridCoreProps & {
|
||||
deferredMeasurementCache?: CellMeasurerCache;
|
||||
autoHeight?: boolean;
|
||||
children?: React.ReactChildren;
|
||||
|
||||
2
types/react-virtualized/index.d.ts
vendored
2
types/react-virtualized/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for react-virtualized 9.4
|
||||
// Type definitions for react-virtualized 9.5
|
||||
// Project: https://github.com/bvaughn/react-virtualized
|
||||
// Definitions by: Kalle Ott <https://github.com/kaoDev>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
@ -1700,6 +1700,7 @@ export class WindowScrollerExample extends PureComponent<any, any> {
|
||||
autoHeight
|
||||
className={'styles.List'}
|
||||
height={height}
|
||||
isScrolling={isScrolling}
|
||||
overscanRowCount={2}
|
||||
rowCount={list.size}
|
||||
rowHeight={30}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user