File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,12 @@ const ScrollIntoViewDefaultOptions: KeyboardAwareHOCOptions = {
128
128
// Sometimes the ref you get is a ref to a wrapped view (ex: Animated.ScrollView)
129
129
// We need access to the imperative API of a real native ScrollView so we need extraction logic
130
130
extractNativeRef : ( ref : Object ) => {
131
- // getNode() permit to support Animated.ScrollView automatically
131
+ // getNode() permit to support Animated.ScrollView automatically, but is deprecated since RN 0.62
132
132
// see https://github.com/facebook/react-native/issues/19650
133
133
// see https://stackoverflow.com/questions/42051368/scrollto-is-undefined-on-animated-scrollview/48786374
134
- if ( ref . getNode ) {
134
+ // see https://github.com/facebook/react-native/commit/66e72bb4e00aafbcb9f450ed5db261d98f99f82a
135
+ const shouldCallGetNode = ! Platform . constants || ( Platform . constants . reactNativeVersion . major === 0 && Platform . constants . reactNativeVersion . minor < 62 )
136
+ if ( ref . getNode && shouldCallGetNode ) {
135
137
return ref . getNode ( )
136
138
} else {
137
139
return ref
You can’t perform that action at this time.
0 commit comments