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
184184
185185type TextInputHandles = Pick <
186186 NativeTextInput ,
187- 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'
187+ 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps' | 'setSelection'
188188> ;
189189
190190const DefaultRenderer = ( props : RenderProps ) => < NativeTextInput { ...props } /> ;
@@ -294,6 +294,8 @@ const TextInput = forwardRef<TextInputHandles, Props>(
294294 isFocused : ( ) => root . current ?. isFocused ( ) || false ,
295295 blur : ( ) => root . current ?. blur ( ) ,
296296 forceFocus : ( ) => root . current ?. focus ( ) ,
297+ setSelection : ( start : number , end : number ) =>
298+ root . current ?. setSelection ( start , end ) ,
297299 } ) ) ;
298300
299301 React . useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments