Questions tagged [react-native-textinput]

240 questions
1
vote
2 answers

My if statement is not working in React Native

I want to build a search bar that filters a flatlist in react native. I'm doing so with a TextInput and a component SearchFilter. In my homescreen I have this TextInput:
1
vote
1 answer

How to make a React Native TextInput accept ONLY NUMBERS and make it accept numbers 1 to 10 ONLY?

How to make a React Native TextInput accept only numbers and make it accept numbers 1 to 10 only? For example, say I input 11, the value should automatically change into the maximum allowed, that is, 10. And when I input 0, the value should…
serking
  • 111
  • 8
1
vote
1 answer

React Native TextInput auto Blur and hides keyboard

I'm building a generic form that fetches data from the server. Like a google forms clone. In the FlatList when I scroll to the bottom the last TextInput element automatically hides the keyboard.
1
vote
1 answer

React Native - Text Input that allows user to enter input but also choose input from a list of options after he start typing

I want to create a component with Text Input and FlatList that accepts input values from user but also from a dropdown list after he starts typing. Has anyone made an implementation like this? I am struggling to create it. Explanation: Say for…
1
vote
2 answers

React Native text input is not responding to touch and not focusing when in multiple Modals

Our project requires us to use a modal that is inside another modal(I know it`s bad but it was not my decision :) ) and it seems like text inputs are unable to focus when they are inside nested modals? Here is a super simple demonstration of a code…
Saik
  • 993
  • 1
  • 16
  • 40
1
vote
3 answers

How to add red asterisk in react native TextInput placeholder?

Inside TextInput, I want to have a red asterisk after placeholder text which is grey in color.
Karan
  • 141
  • 2
  • 13
1
vote
1 answer

How we can bold some words in TextInput component React Native?

I want something feature in textInput like if we write hello then hello should be bold in the textinput and remaining words will be normal. Can someone help me out with it? It's something different from Text Component, which mentioned in below…
1
vote
1 answer

How to move text right in Text Input

I wanted to style up my app by adding border radius to a text input, I observed that the text in the input is going outside from the corners how can I move it to the right. This is the Text Input code
Shubham Deswal
  • 57
  • 1
  • 15
1
vote
1 answer

How to get a $ sign and a comma separator in TextInput?

I am trying to figure out how to 1) get a comma separator and a $ when text is entered via TextInput and 2) also show $ and a comma separator for results when the function does calculation? Many thanks Code example: import React, {useState}…
Natalia G
  • 11
  • 1
1
vote
0 answers

How do I restrict the number of lines in textInput? In React

this is my first stackoverflow question, please bare with me if I do anyhting wrong. Here goes my question: how do I restrict the number of lines in a textInput using react? I have to say im new to react and dont know if i am doing it wrong. I have…
jonhdoe420
  • 43
  • 5
1
vote
0 answers

How to add a new native component to react native

Situation: We've used patch-package to the react-native package in order to disable adding a new line when the user presses return in multiline TextInput. Problem: We only want this behavior of TextInput in one section of the app but not anywhere…
mysl
  • 1,003
  • 2
  • 9
  • 19
1
vote
3 answers

How to create an rxjs Observable from TextInput (either onChange or onTextChange)

I want to create an observable from a change event that gets fired on a React Native TextInput component. TextInput comes with 2 change props that I'm aware of (onChangeText and onChange). From what I gather, you need to use onChange if you want…
Jo Momma
  • 1,126
  • 15
  • 31
1
vote
0 answers

React Native force fullscreen keyboard in landscape

I have a simple TextInput in my react-native Android app and I basically need to bring the fullscreen editing mode when focused on the keyboard while in landscape mode. As from what I've read, the system may automatically adjust this if needed.…
Faruk Yazici
  • 2,344
  • 18
  • 38
1
vote
1 answer

TextInput show values from get Api and after update show new values in react native

I have an API that I'm retrieving data from, and I'm setting the data inside my input values, user should be able to edit those inputs and update, but when i try to type in the input it won't type anything and the value stays as it is. for updating…
1
vote
1 answer

TextInput vanishes inside ScrollView React Native

Scenario: I want to achieve a situation like the code shown below. Where there will be: A multiline TextInput with other components and the screen will be scrollable. I don't want the TextInput to be scrollable. Problem: What happens is, after…