Skip to content

Commit ea13c8c

Browse files
slorberalvaromb
authored andcommitted
_handleRef: support for Animated wrappers (APSL#274)
Currently the ref provided by Animated.ScrollView is a wrapper, on which we can call "getNode()" The current change ensure that we unwrap the real scrollview before trying to use the scrollview methods, and keep retrocompatibility for non-animated scrollviews See also facebook/react-native#19650
1 parent b788ad3 commit ea13c8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/KeyboardAwareHOC.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
410410
}
411411

412412
_handleRef = (ref: React.Component<*>) => {
413-
this._rnkasv_keyboardView = ref
413+
this._rnkasv_keyboardView = ref.getNode ? ref.getNode() : ref
414414
if (this.props.innerRef) {
415415
this.props.innerRef(this._rnkasv_keyboardView)
416416
}

0 commit comments

Comments
 (0)