mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
@@ -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 {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user