From b43aa232eb3377fa2c8b299d7dbda61e6e049706 Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 14 Mar 2019 11:57:32 -0700 Subject: [PATCH] Migrate TextInput to use new setNativeProps API Summary: See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information. This shouldn't be a user facing change. Reviewed By: shergin Differential Revision: D14176217 fbshipit-source-id: 784739e5a69a98ddd1d5db75ee5267b7459e477b --- Libraries/Components/TextInput/TextInput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index d21758bf7fe..62be7517ee1 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -1239,7 +1239,7 @@ const TextInput = createReactClass({ // Make sure to fire the mostRecentEventCount first so it is already set on // native when the text value is set. if (this._inputRef && this._inputRef.setNativeProps) { - this._inputRef.setNativeProps({ + ReactNative.setNativeProps(this._inputRef, { mostRecentEventCount: event.nativeEvent.eventCount, }); } @@ -1304,7 +1304,7 @@ const TextInput = createReactClass({ this._inputRef && this._inputRef.setNativeProps ) { - this._inputRef.setNativeProps(nativeProps); + ReactNative.setNativeProps(this._inputRef, nativeProps); } if (this.props.selectionState && selection) {