Questions tagged [react-native-textinput]
240 questions
3
votes
2 answers
TextInput clears text when secureTextEntry is true
Hello I am using TextInput of react native and there is an eye option to view or hide password. When I set secureTextEntry to true and type another character in input it clears all previous data and just types the character.
Here is my code…

Vishu Bhardwaj
- 271
- 4
- 12
3
votes
1 answer
react-native get selection text start and end from text component
I used Text component reference:
https://facebook.github.io/react-native/docs/text.html
with property selectable={true}, is there any solution to get the user text selection start and end on Text component not TextInput component?
because I need…

NaDa Bayomy
- 31
- 3
2
votes
0 answers
Why is my TextInput out of sync with state when I give rapid inputs?
I'm creating a typing race game with React Native which is producing an unexpected bug on Android.
When the user finishes typing a word/spacebar, I set the input state to an empty string.
However, if the user finishes typing a word/spacebar then…

Aria
- 33
- 5
2
votes
0 answers
Keyboard closes after every keypress in TextInput in react native?
I am working on a react-native app in which I am facing a problem with the TextInput.
I am working on TSX(Typescript) and I have used react-native's textInput.
Whenever I press on a key on the keyboard, the keyboard automatically closes down.
I have…

Kaushal Lalani
- 125
- 2
- 16
2
votes
0 answers
React-Native keyboard autoFocus issue after first opening
I want to make a to-do app for learn React-Native. I added an add button for new tasks. When you push the button, add button is hide and textInput, save button are show. In here, keyboard focus has to automatic. So, I opened autofocus but it is…

Furkan Özgel
- 21
- 3
2
votes
0 answers
TextInput loses focus if keyboard overlaps it on Android
I have a very simple TextInput component on a screen like and an onEndEditing method like so:

pfinferno
- 1,779
- 3
- 34
- 62
2
votes
0 answers
Determining how many characters can fit on a single line of TextInput
I have a TextInput that has a dynamic placeholder which can extend beyond a single line. I want to truncate this placeholder with an ellipses before it starts wrapping to the next line. The numberOfLines prop does not affect the result.
Is there a…

pfinferno
- 1,779
- 3
- 34
- 62
2
votes
1 answer
Stopping multiline textInput component to scroll inside ScrollView
I am working on React Native in which I want to stop multiline textinput component's scroll inside ScrollView. How we can achieve it? Android Specially!

Muhammad Rafeh Atique
- 722
- 5
- 22
2
votes
0 answers
Browsers on mobile iOS devices - React Native TextInput onChangeText not updating text value
I am using a state to store the text and update it as typed. The value of the TextInput is then changed as the state is changed. This works as a packaged app but not in a an ios browser. Please let me know if there is a better way to implement this…

chris67x
- 33
- 4
2
votes
1 answer
Problem Keyboard hide after write one char in TextInput (textinput inside Flatlist Header)
i spent two days on this problem , the problem is :
when i placed a TextInput inside a Flatlist , the behavior of the TextInput Changed , the Keyboard lose focus after every character writed.
Version
React-native : 0.63.2
react : 16.13.1,
react-dom…

Oussama Nm
- 35
- 1
- 8
2
votes
3 answers
React Native Text Input focus with useRef using Typescript
I have an issue with focusing the next input in React Native. I use just one input called GeneralTextInput.tsx in the whole app.
In this example I have 2 inputs ==> 1.Group Name, 2.Group Description
So I give some props in the parent to this…

Oğuzhan Yıldırım
- 146
- 2
- 12
2
votes
1 answer
React Native TextInput color issue in fullscreen landscape mode
I have a simple TextInput in my react-native Android app. And it opens as fullscreen when focused in landscape mode. However in the fullscreen keyboard mode, both the background and foreground is white, therefore I can't see the text I'm…

Faruk Yazici
- 2,344
- 18
- 38
2
votes
0 answers
Why does TextInput try to update value when my onChangeText method has a filter/regex it has to pass?
I'm in the process of creating my own NumberInput component using react-natives TextInput. However I'm having trouble trying to validate the input the user is trying to submit/enter in to the field. I have a regex to check if the value the user is…

Fresh Java
- 107
- 1
- 10
2
votes
0 answers
React Native TextInput - How can I change the keyboard language dynamically
Problem:
I have two TextInput fields one for the username that must be in English and the second input is for the name that will take the name in Arabic so here I need to switch the keyboard language according to the focused input.
System:
OS:…

AliRehman7141
- 873
- 3
- 12
- 33
2
votes
1 answer
Passing refs on React Native with TypeScript: (property) React.MutableRefObject.current: null Object is possibly 'null'.ts(2531)
I have several fields on a React Native form and I would like that the focus jump from one to the next one each time the user validate the field with the virtual keyboard.
I came up with something like that:

Xiiryo
- 3,021
- 5
- 31
- 48