Questions tagged [react-native-textinput]

240 questions
1
vote
0 answers

React Native: Illegal node ID set as an input for Animated.Add node

I'm using React Native 0.63.4 and getting this error sometimes. Pretty sure it is related to input focus, both autofocus and user manual focus. The problem is: it almost never happens, very sporadic, but crashes the app in both RELEASE and DEBUG,…
Siipe
  • 468
  • 1
  • 5
  • 13
1
vote
0 answers

How to receive one callback from three simultaneous events in React Native?

I'm listening to three different events that happen simultaneously and I want to get some data from each of these events. However, I want to receive the latest data from all three events at once. I tried using useEffect but, of course, this is…
1
vote
1 answer

Get cursor position, text and key in a React Native TextInput onKeyPress

I need to get the current cursor position, the current text value and the pressed key of a TextInput when the text value changes, either in onKeyPress or in onChangeText. For example, typing "A" should result in the following: keyboardKey:…
Yulian
  • 6,262
  • 10
  • 65
  • 92
1
vote
2 answers

Why can't clear value from TextInput in react native using Hooks?

I am trying to clear user's value from TextInput when user click on button but ican't get it. I am implementing this demo using Hooks in react-native. So please help me I am new in hooks with react-native.Thank you in advanced. import React, {…
Raghusingh
  • 398
  • 3
  • 10
  • 33
1
vote
0 answers

React Native displaying the wrong value

I'm trying to do a 6 digits verification code form (I know there is actually a package to do but I want it differently). So I've done it like so: const RegisterStep2 = (props) => { const [digits, setDigits] = useState([]); const textInputRefs =…
eJanuel
  • 13
  • 2
1
vote
1 answer

How to make multiline TextInput shrink when deleting lines (React-Native)?

I have a custom multiline TextInput which grows/expands automatically to fit its content: import React, { useState } from 'react' import { TextInput } from 'react-native' export function MyInput() { const [value, setValue] =…
1
vote
2 answers

TextInput onChangeText set useState value is not working in React Native Testing with Enzyme

I want to test that user should not navigate to any other screen if TextInput equals to "". I have tried to put console logs to understand more correctly but the problem is now that, after input.simulate("changeText", "any@email.com"); happened…
1
vote
3 answers

Props in custom components React native + Typescript

I've got a problem with access to onChangeText in my custom component. Here is the code of my component: import React from 'react'; import {TextInput, StyleSheet} from 'react-native'; type Props= { style:any } const Input = (props:Props)…
1
vote
0 answers

How do I fix glitching of keyboard when textInput is below keyboard level?

I am developing a password management app in react-native(expo). I Today, I encountered this glitch/bug where the keyboard automatically hides if a TextInput is below the keyboard level. It works if I position it, above keyboard level. I tried…
TechySharnav
  • 4,869
  • 2
  • 11
  • 29
1
vote
1 answer

React Native TextInput onSubmitEditing firing with every button press

I'm having trouble with onSubmitEditing firing with every button press of my input keyboard AND when the current page first loads (that part is especially puzzling). The TextInput code is as follows: const TimerInput = () => { const [ value,…
SunnyNonsense
  • 410
  • 3
  • 22
1
vote
0 answers

onPress of children ignored within TextInput

We are working on an app where a user can read a document, highlight as section and leave a comment. We've tried a few libraries for text highlighting and ultimately built our own, however most of the npm packages I see follow a similar approach:…
sbatson5
  • 648
  • 11
  • 19
1
vote
1 answer

[React Native]Hide Text Input default Keyboard

I have created a customized native keyboard component for my application. Now I want to render that keyboard instead of default one. How can I do this? I tried
Rohit Aggarwal
  • 1,048
  • 1
  • 14
  • 32
1
vote
2 answers

TextInput in FlatList Item

I have a problem like picture below: Text As you guy can see I have info on every item: name and stock. Now I want to update stock on single item by type a number to text Input But when I type 3 into 1 Text Input, it fills 3 in all the remaining…
1
vote
1 answer

React Native: is it possible to force characters in TextInput to be capitals?

I'm using a TextInput in my React Native app with autocapitalize: 'characters'. It autocapitalizes all characters, but I'm still able to press the shift key (iOS), which switches to lowercase. I want to prevent the user from being able to switch to…
gkeenley
  • 6,088
  • 8
  • 54
  • 129
1
vote
0 answers

React Native TextInput masking is buggy

I'm trying to make a masked TextInput for BRL currency using regex, so every time the user types a number it is formated as follow: First the number pressed appears inside the TextInput and then you can change the state to your desired value. Isn't…
Gabriel Amorim
  • 370
  • 2
  • 13