I am facing this issue in iOS, did same thing on this link React Native TextInput that only accepts numeric characters but did not slove in iOS deivce
changes by setting state not reflecting in TextInput, below is my code:
constructor(props) {
super(props);
this.state = {
enteredMobile: '',
};}
onChanged(text){
this.setState({
enteredMobile: text.replace(/[^0-9]/g, ''),
});
}
My Text Input
<TextInput
placeholderTextColor="lightgrey"
placeholder="Enter mobile no."
keyboardType = 'numeric'
maxLength={10}
style={{height: 40,top:140, left :94,width:500, borderColor: 'white', borderWidth: 1}}
onChangeText={(text) => this.onChanged(text)}
value = {this.state.enteredMobile}
/>
You can see the updated one in the image below the table but its not updating TextInput itself.