Skip to content

Commit 8998994

Browse files
author
Joshua Jahans
committed
move ref
1 parent 0c183d6 commit 8998994

2 files changed

Lines changed: 4409 additions & 4 deletions

File tree

src/ImageHeaderScrollView.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,18 @@ class ImageHeaderScrollView extends Component<Props, State> {
250250
]}
251251
ref={ref => {
252252
this.container = ref;
253-
if (getScrollViewRef) {
254-
getScrollViewRef(ref);
255-
}
256253
}}
257254
onLayout={this.onContainerLayout}
258255
>
259256
{this.renderHeader()}
260257
<ScrollViewComponent
261-
ref={ref => (this.scrollViewRef = ref)}
258+
ref={ref => {
259+
if (getScrollViewRef) {
260+
getScrollViewRef(ref);
261+
}
262+
263+
this.scrollViewRef = ref;
264+
}}
262265
scrollEventThrottle={16}
263266
overScrollMode="never"
264267
{...scrollViewProps}

0 commit comments

Comments
 (0)