File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ interface CompoundedComponent
184
184
185
185
type TextInputHandles = Pick <
186
186
NativeTextInput ,
187
- 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'
187
+ 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps' | 'setSelection'
188
188
> ;
189
189
190
190
const DefaultRenderer = ( props : RenderProps ) => < NativeTextInput { ...props } /> ;
@@ -294,6 +294,8 @@ const TextInput = forwardRef<TextInputHandles, Props>(
294
294
isFocused : ( ) => root . current ?. isFocused ( ) || false ,
295
295
blur : ( ) => root . current ?. blur ( ) ,
296
296
forceFocus : ( ) => root . current ?. focus ( ) ,
297
+ setSelection : ( start : number , end : number ) =>
298
+ root . current ?. setSelection ( start , end ) ,
297
299
} ) ) ;
298
300
299
301
React . useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments