From 1c2daecf2d91194df00b98ff363b6721ae1b5203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sz=C5=91ke=20Szabolcs?= Date: Sat, 14 Oct 2017 01:18:51 +0300 Subject: [PATCH] react-virtualized: add missing properties to GridCellRangeProps, fix incorrect type for overscanIndicesGetter in Grid.defaultProps (#20412) * react-virtualized: added missing properties to GridCellRangeProps * react-virtualized: corrected type of overscanIndicesGetter in Grid.defaultProps * react-virtualized: added name to "Definitions by" section --- types/react-virtualized/dist/es/Grid.d.ts | 11 +++++++++-- types/react-virtualized/index.d.ts | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/types/react-virtualized/dist/es/Grid.d.ts b/types/react-virtualized/dist/es/Grid.d.ts index cc4cbaa9ac..9a6492f368 100644 --- a/types/react-virtualized/dist/es/Grid.d.ts +++ b/types/react-virtualized/dist/es/Grid.d.ts @@ -126,7 +126,14 @@ export type GridCellRangeProps = { rowStartIndex: number, rowStopIndex: number, scrollLeft: number, - scrollTop: number + scrollTop: number, + deferredMeasurementCache: CellMeasurerCache, + horizontalOffsetAdjustment: number, + parent: Grid | List | Table, + styleCache: Map, + verticalOffsetAdjustment: number, + visibleColumnIndices: VisibleCellRange, + visibleRowIndices: VisibleCellRange } export type GridCellRangeRenderer = (params: GridCellRangeProps) => React.ReactNode[]; @@ -375,7 +382,7 @@ export class Grid extends PureComponent { onScroll: () => null, onSectionRendered: () => null, overscanColumnCount: 0, - overscanIndicesGetter: OverscanIndicesGetterParams, + overscanIndicesGetter: OverscanIndicesGetter, overscanRowCount: 10, role: 'grid', scrollingResetTimeInterval: typeof DEFAULT_SCROLLING_RESET_TIME_INTERVAL, diff --git a/types/react-virtualized/index.d.ts b/types/react-virtualized/index.d.ts index 8bd32e7b26..12febb7edf 100644 --- a/types/react-virtualized/index.d.ts +++ b/types/react-virtualized/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Kalle Ott // John Gunther // Konstantin Nesterov +// Szőke Szabolcs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3