10
10
'use strict' ;
11
11
12
12
const DeprecatedTextInputPropTypes = require ( '../../DeprecatedPropTypes/DeprecatedTextInputPropTypes' ) ;
13
- const DocumentSelectionState = require ( '../../vendor/document/selection/DocumentSelectionState' ) ;
14
13
const NativeMethodsMixin = require ( '../../Renderer/shims/NativeMethodsMixin' ) ;
15
14
const Platform = require ( '../../Utilities/Platform' ) ;
16
15
const React = require ( 'react' ) ;
@@ -221,23 +220,6 @@ type IOSProps = $ReadOnly<{|
221
220
*/
222
221
enablesReturnKeyAutomatically ?: ?boolean ,
223
222
224
- /**
225
- * An instance of `DocumentSelectionState`, this is some state that is responsible for
226
- * maintaining selection information for a document.
227
- *
228
- * Some functionality that can be performed with this instance is:
229
- *
230
- * - `blur()`
231
- * - `focus()`
232
- * - `update()`
233
- *
234
- * > You can reference `DocumentSelectionState` in
235
- * > [`vendor/document/selection/DocumentSelectionState.js`](https://github.com/facebook/react-native/blob/master/Libraries/vendor/document/selection/DocumentSelectionState.js)
236
- *
237
- * @platform ios
238
- */
239
- selectionState ?: ?DocumentSelectionState ,
240
-
241
223
/**
242
224
* When the clear button should appear on the right side of the text view.
243
225
* This property is supported only for single-line TextInput component.
@@ -1115,10 +1097,6 @@ const TextInput = createReactClass({
1115
1097
if ( this . props . onFocus ) {
1116
1098
this . props . onFocus ( event ) ;
1117
1099
}
1118
-
1119
- if ( this . props . selectionState ) {
1120
- this . props . selectionState . focus ( ) ;
1121
- }
1122
1100
} ,
1123
1101
1124
1102
_onPress : function ( event : PressEvent ) {
@@ -1161,7 +1139,7 @@ const TextInput = createReactClass({
1161
1139
1162
1140
this . _lastNativeSelection = event . nativeEvent . selection ;
1163
1141
1164
- if ( this . props . selection || this . props . selectionState ) {
1142
+ if ( this . props . selection ) {
1165
1143
this . forceUpdate ( ) ;
1166
1144
}
1167
1145
} ,
@@ -1198,10 +1176,6 @@ const TextInput = createReactClass({
1198
1176
) {
1199
1177
this . _inputRef . setNativeProps ( nativeProps ) ;
1200
1178
}
1201
-
1202
- if ( this . props . selectionState && selection ) {
1203
- this . props . selectionState . update ( selection . start , selection . end ) ;
1204
- }
1205
1179
} ,
1206
1180
1207
1181
_onBlur : function ( event : BlurEvent ) {
@@ -1211,10 +1185,6 @@ const TextInput = createReactClass({
1211
1185
if ( this . props . onBlur ) {
1212
1186
this . props . onBlur ( event ) ;
1213
1187
}
1214
-
1215
- if ( this . props . selectionState ) {
1216
- this . props . selectionState . blur ( ) ;
1217
- }
1218
1188
} ,
1219
1189
1220
1190
_onTextInput : function ( event : TextInputEvent ) {
0 commit comments