Skip to content

Commit acc6d59

Browse files
author
Joshua Jahans
committed
pass ref callback
1 parent 4f82f09 commit acc6d59

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/ImageHeaderScrollView.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ class ImageHeaderScrollView extends Component<Props, State> {
232232
onScroll,
233233
ScrollViewComponent,
234234
scrollViewBackgroundColor,
235+
getScrollViewRef,
235236
...scrollViewProps
236237
} = this.props;
237238
/* eslint-enable no-unused-vars */
@@ -247,7 +248,12 @@ class ImageHeaderScrollView extends Component<Props, State> {
247248
backgroundColor: scrollViewBackgroundColor,
248249
},
249250
]}
250-
ref={ref => (this.container = ref)}
251+
ref={ref => {
252+
this.container = ref;
253+
if (getScrollViewRef) {
254+
getScrollViewRef(ref);
255+
}
256+
}}
251257
onLayout={this.onContainerLayout}
252258
>
253259
{this.renderHeader()}

0 commit comments

Comments
 (0)