[react-virtualized] Fix WindowScrollerChildProps (#27880)

This commit is contained in:
Brandon Hall
2018-08-06 15:05:06 -04:00
committed by Sheetal Nandi
parent a04576e800
commit ef1f0f87e8
2 changed files with 4 additions and 13 deletions

View File

@@ -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;

View File

@@ -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