Migrate scrollResponderScrollNativeHandleToKeyboard function to take nativeRef

Summary:
We need to get rid of findNodeHandle calls so migrating scrollResponderScrollNativeHandleToKeyboard to take a ref to a host component.

I made this change with Flow, and tested by rendering UserJobApplicationForm

Reviewed By: mdvacca

Differential Revision: D17099280

fbshipit-source-id: 96af692006aace2c206f268f5416984b00f8a438
This commit is contained in:
Eli White
2019-09-19 18:16:20 -07:00
committed by Facebook Github Bot
parent 3e4c5c09c3
commit 0baacbecf5
3 changed files with 52 additions and 13 deletions
@@ -904,6 +904,12 @@ const TextInput = createReactClass({
this._inputRef = ref;
},
getNativeRef: function(): ?React.ElementRef<
Class<ReactNative.NativeComponent<mixed>>,
> {
return this._inputRef;
},
_renderIOSLegacy: function() {
let textContainer;
@@ -1224,6 +1230,10 @@ const TextInput = createReactClass({
class InternalTextInputType extends ReactNative.NativeComponent<Props> {
clear() {}
getNativeRef(): ?React.ElementRef<
Class<ReactNative.NativeComponent<mixed>>,
> {}
// $FlowFixMe
isFocused(): boolean {}
}