How do I get the value in TextInput when onBlur is called?

You should use the ‘onEndEditing’ method instead of the ‘onBlur’

onEndEditing?: function Callback that is called when text input ends.

onBlur is a component function where onEndEditing is specific for TextInput

onEndEditing

This approach works for both multiline and single line.

<TextInput 
    onEndEditing={(e: any) => 
    {
        this.setState({textValue: e.nativeEvent.text})
    }
}/>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)