mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
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:
committed by
Facebook Github Bot
parent
fc94ade11c
commit
b43aa232eb
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user