File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,12 @@ const ScrollIntoViewDefaultOptions: KeyboardAwareHOCOptions = {
128128 // Sometimes the ref you get is a ref to a wrapped view (ex: Animated.ScrollView)
129129 // We need access to the imperative API of a real native ScrollView so we need extraction logic
130130 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
132132 // see https://github.com/facebook/react-native/issues/19650
133133 // 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 ) {
135137 return ref . getNode ( )
136138 } else {
137139 return ref
You can’t perform that action at this time.
0 commit comments