Skip to content

Commit 25cb97e

Browse files
authored
🤖 Merge PR DefinitelyTyped#72279 [fixed-data-table-2] fix: onScrollStart and onScrollEnd arguments typings by @whygee-dev
1 parent d55857e commit 25cb97e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎types/fixed-data-table-2/fixed-data-table-2-tests.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ class MyTable5 extends React.Component {
181181
headerHeight={50}
182182
width={1000}
183183
height={500}
184-
onScrollStart={(x: number, y: number) => {}}
185-
onScrollEnd={(x: number, y: number) => {}}
184+
onScrollStart={(x: number, y: number, firstRowIndex: number, lastRowIndex: number) => {}}
185+
onScrollEnd={(x: number, y: number, firstRowIndex: number, lastRowIndex: number) => {}}
186186
onContentHeightChange={(newHeight: number) => {}}
187187
onRowClick={(event: React.SyntheticEvent<Table>, rowIndex: number) => {}}
188188
onRowContextMenu={(event: React.SyntheticEvent<Table>, rowIndex: number) => {}}

‎types/fixed-data-table-2/index.d.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,15 @@ export interface TableProps extends React.ClassAttributes<Table> {
272272

273273
/**
274274
* Callback that is called when scrolling starts with current horizontal
275-
* and vertical scroll values.
275+
* and vertical scroll values, as well as the first and last row index.
276276
*/
277-
onScrollStart?: ((x: number, y: number) => void) | undefined;
277+
onScrollStart?: ((x: number, y: number, firstRowIndex: number, lastRowIndex: number) => void) | undefined;
278278

279279
/**
280280
* Callback that is called when scrolling ends or stops with new horizontal
281-
* and vertical scroll values.
281+
* and vertical scroll values, as well as the first and last row index.
282282
*/
283-
onScrollEnd?: ((x: number, y: number) => void) | undefined;
283+
onScrollEnd?: ((x: number, y: number, firstRowIndex: number, lastRowIndex: number) => void) | undefined;
284284

285285
/**
286286
* If enabled scroll events will not be propagated outside of the table.

0 commit comments

Comments
 (0)