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
This commit is contained in:
Eli White
2019-03-14 11:57:32 -07:00
committed by Facebook Github Bot
parent fc94ade11c
commit b43aa232eb

View File

@@ -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) {