I am using TextInput for a project and wanted to DISABLE any kind of text selection or actions like (cut/copy/paste/share) as shared in the screenshot below.
I am not able find anything in the react-native official documentation
Disable the TextBox by adding the e-disabled to the input parent element and set disabled attribute to the input element.
To disable an input field inside a <Form /> function component, we will use isDisabled local state and it's setter method setIsDisabled , defined using the useState() hook.
How to disable autocomplete on react native paper TextInput? with autoComplete="off" render autocomplete="noop" on the web. Bookmark this question. Show activity on this post. The autoComplete="off" is replaced with autocomplete="noop" in the rendered HTML, which cause the auto complete not to be disabled.
You should add 2 attributes selectTextOnFocus
and editable
For example:
<TextInput editable={false} selectTextOnFocus={false} />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With