Questions tagged [react-native-textinput]

240 questions
0
votes
2 answers

Keep getting: FirebaseError: Function DocumentReference.update() called with invalid data. Unsupported field value: a function

I'm trying to update a field for a certain user when they fill out a certain TextInput. When I fill in the form, it updates the field in the Cloud Firestore. However, I keep getting warnings or errors: A warning I get: Warning: Failed prop type:…
0
votes
1 answer

How to get ref x, y position in functional component in react-native?

I want to get the x, y position when the text cursor is focused on TextInput. how to get ref position? here is my code const Code = () => { const emailInput = useRef(); const scrollViewRef = useRef(); const [email, setEmail] =…
0
votes
0 answers

I want to use different color and font family for each char value of React-Native TextInput

My code: export default class ClearComponent extends Component { color= ['red', 'blue'] font_family= ['normal', 'notoserif', 'sans-serif'] state = { text: '', context: [ ], color:"black", …
0
votes
2 answers

How can I change a specific string of an array of objects with TextInput in react native using react hook?

I have created a button that whenever is touched, it adds this object, {problema: '', solucion: '', key: Math.random(), index: index+1}, to this useState array, const [data, setData] = useState ([]). The constant data is used in a Flatlist that…
0
votes
2 answers

Is it possible to dismiss the keyboard without making the focused component lose it?

I need to give focus to a TextInput without having the keyboard to open, because I might have a physical keyboard connected to the device in my use case scenario and I might want to keep virtual keyboard enabled on Android. The solution I thought to…
balsick
  • 1,099
  • 1
  • 10
  • 23
0
votes
2 answers

React Native: Is it possible to TextInput keep on focus when the Modal is opened?

I need to keep input text in TextInput while the Modal is opened. FYI, TextInput is not a child component of Modal I know it doesn't normal but the situation is pushing me to do this. Please help me if you have experience in solving this kind of…
0
votes
2 answers

Cutted on left for Android (BOLD text bug)

I have react-native TextInput that automatically grows if I input long strings. On iOS it works as expected, but on Android, it starts cutting-off left side after 5-7 characters. The longer the string - the bigger cut-off. I tried to remove margins…
0
votes
0 answers

React Native - UseState, number-pad not working

Here is my code - const StartGameScreen = props => { const [enteredValue, setEnteredValue] = useState(''); const numberInputHandler = inputText => { setEnteredValue(inputText); }; const resetInputHandler = () => { …
0
votes
0 answers

Call onBlur on tap of outside the textInput component

render(){ return( alert('Focued')} onBlur={() => alert('Blurred') } /> ) } In the above code snippet when…
Shariq
  • 83
  • 2
  • 13
0
votes
0 answers

React Native Remove Input Border (for Android 4.4.2)

This is shown on phones with a low Android version(4.4.2). Even though I removed the input border, it still looks like a border. Is there a prop to remove it Image: My TextInput code
0
votes
1 answer

Figure out if TextInput has focus via ref

The configuration is as follows: class MyComponent extends Component { constructor(props) { super(props); this.inputRef = React.createRef(); } ... render() { ...
Denis Kulagin
  • 8,472
  • 17
  • 60
  • 129
0
votes
3 answers

How to display no of TextInputs based on the user select no from Picker and store values of textinput in array

I'm allowing the user to select a number from picker it can by any no like 1,4,6 random. When he selects a number like 3 then 3 TextInputs will be shown and he will enter something in 3 input fields and I want to save these values into an array. How…
0
votes
2 answers

How to concatenate numaric code and string inside TextInput value using React Native

There are two variables like. this.state={Amount=50, CurrencySymbol="₹"} TextInput Render but the Currency symbol is not…
vicky
  • 1,546
  • 1
  • 18
  • 35
0
votes
1 answer

How to change color of text input underline when clicked?

I want to change the color of text input underline when i click on perticular textinput field, currently i have two text input field for email and password, and i have created component for textinput and iam using onfocus and onblur, My issue is…
0
votes
1 answer

Call function when TextInput clear button is pressed in React Native

I have a TextInput with a clear button (clearButtonMode prop set to 'always'): this.SearchFilterFunction(text)} underlineColorAndroid="transparent" …
spitchay
  • 89
  • 1
  • 10