We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27a6556 commit 47e2841Copy full SHA for 47e2841
1 file changed
src/components/TextInput/TextInput.tsx
@@ -184,7 +184,7 @@ interface CompoundedComponent
184
185
type TextInputHandles = Pick<
186
NativeTextInput,
187
- 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'
+ 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps' | 'setSelection'
188
>;
189
190
const DefaultRenderer = (props: RenderProps) => <NativeTextInput {...props} />;
@@ -294,6 +294,8 @@ const TextInput = forwardRef<TextInputHandles, Props>(
294
isFocused: () => root.current?.isFocused() || false,
295
blur: () => root.current?.blur(),
296
forceFocus: () => root.current?.focus(),
297
+ setSelection: (start: number, end: number) =>
298
+ root.current?.setSelection(start, end),
299
}));
300
301
React.useEffect(() => {
0 commit comments