diff --git a/driver/js/packages/hippy-react/src/components/list-view.tsx b/driver/js/packages/hippy-react/src/components/list-view.tsx index db096880c59..b8e78583afd 100644 --- a/driver/js/packages/hippy-react/src/components/list-view.tsx +++ b/driver/js/packages/hippy-react/src/components/list-view.tsx @@ -494,20 +494,21 @@ class ListView extends React.Component { style = getFooterStyle(); } if (typeof renderPullFooter === 'function') { - pullFooter = ( - { - this.pullFooter = ref; - }} - onFooterPulling={onFooterPulling} - onFooterReleased={onFooterReleased} - > - { renderPullFooter() } - - ); + const footerProps: any = { + style, + key: 'pull-footer', + ref: (ref) => { + this.pullFooter = ref; + }, + }; + + if (typeof onFooterPulling === 'function') { + footerProps.onFooterPulling = onFooterPulling; + } + if (typeof onFooterPulling === 'function') { + footerProps.onFooterReleased = onFooterReleased; + } + pullFooter = {renderPullFooter()}; } return pullFooter; } diff --git a/driver/js/packages/hippy-react/src/components/waterfall-view.tsx b/driver/js/packages/hippy-react/src/components/waterfall-view.tsx index 77ea38be498..af2107f8677 100644 --- a/driver/js/packages/hippy-react/src/components/waterfall-view.tsx +++ b/driver/js/packages/hippy-react/src/components/waterfall-view.tsx @@ -458,18 +458,18 @@ class WaterfallView extends React.Component { ) { let pullFooter: JSX.Element | null = null; if (typeof renderPullFooter === 'function') { - pullFooter = ( - { - this.pullFooter = ref; - }} - onFooterPulling={onFooterPulling} - onFooterReleased={onFooterReleased} - > - { renderPullFooter() } - - ); + const footerProps: any = { + key: 'PullFooter', + ref: (ref) => { + this.pullFooter = ref; + }, + onFooterReleased, + }; + + if (typeof onFooterPulling === 'function') { + footerProps.onFooterPulling = onFooterPulling; + } + pullFooter = {renderPullFooter()}; } return pullFooter; }