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:14:07 -07:00
committed by grabbou
parent 54bf3ae1cf
commit 09c4e7caf0
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;
@@ -1227,6 +1233,10 @@ const TextInput = createReactClass({
class InternalTextInputType extends ReactNative.NativeComponent<Props> {
clear() {}
getNativeRef(): ?React.ElementRef<
Class<ReactNative.NativeComponent<mixed>>,
> {}
// $FlowFixMe
isFocused(): boolean {}
}