mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
[react-virtualized] Fix WindowScrollerChildProps (#27880)
This commit is contained in:
committed by
Sheetal Nandi
parent
a04576e800
commit
ef1f0f87e8
@@ -11,26 +11,16 @@ export type WindowScrollerChildProps = {
|
||||
width: number;
|
||||
isScrolling: boolean;
|
||||
scrollTop: number;
|
||||
onChildScroll: () => void;
|
||||
onChildScroll: (params: { scrollTop: number }) => void;
|
||||
};
|
||||
|
||||
export type WindowScrollerProps = {
|
||||
/**
|
||||
* Function responsible for rendering children.
|
||||
* This function should implement the following signature:
|
||||
* ({ height, isScrolling, scrollLeft, scrollTop, width }) => PropTypes.element
|
||||
* ({ height, isScrolling, scrollLeft, scrollTop, width, onChildScroll }) => PropTypes.element
|
||||
*/
|
||||
children: (
|
||||
params: {
|
||||
onChildScroll: (params: { scrollTop: number }) => void;
|
||||
registerChild: (params?: Element) => void;
|
||||
height: number;
|
||||
isScrolling: boolean;
|
||||
scrollLeft: number;
|
||||
scrollTop: number;
|
||||
width: number;
|
||||
}
|
||||
) => React.ReactNode;
|
||||
children: (params: WindowScrollerChildProps) => React.ReactNode;
|
||||
|
||||
/** Callback to be invoked on-resize: ({ height, width }) */
|
||||
onResize?: (params: { height: number; width: number }) => void;
|
||||
|
||||
1
types/react-virtualized/index.d.ts
vendored
1
types/react-virtualized/index.d.ts
vendored
@@ -7,6 +7,7 @@
|
||||
// Kræn Hansen <https://github.com/kraenhansen>
|
||||
// Steve Zhang <https://github.com/Stevearzh>
|
||||
// Maciej Goszczycki <https://github.com/mgoszcz2>
|
||||
// Brandon Hall <https://github.com/brandonhall>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user