diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index a9f6716a3..7909b5a8f 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -325,7 +325,23 @@ type Props = $ReadOnly<{| const TextInput = createReactClass({ displayName: 'TextInput', - + statics: { + State: { + currentlyFocusedField: TextInputState.currentlyFocusedField, + focusTextInput: (textFieldID: ?number) => { + console.warn( + '`focusTextInput` is deprecated, use the `focus` method of the `TextInput` ref instead.', + ); + TextInputState.focusTextInput(textFieldID); + }, + blurTextInput: (textFieldID: ?number) => { + console.warn( + '`blurTextInput` is deprecated, use `Keyboard.dismiss` or the `blur` method of the `TextInput` ref.', + ); + TextInputState.blurTextInput(textFieldID); + }, + }, + }, propTypes: { ...ViewPropTypes, /**