How to add custom elements to TextInput left or right

<TextInput // label={label} value={val} style={this.styles.TextInput} placeholder={placeholder} left={ <TextInput.Icon color="#8C8C8C" icon="lock" size={30} /> } right={ <Button mode="outlined" disabled={hasPhone} compact> "confirm" </Button> } secureTextEntry={isPwd} onChangeText={(text) => this.setText(text, filed) } />
Left can be show Element, but right can’t.

“react-native”: “0.63.2”,
“react-native-paper”: “^4.1.0”,
“react-native-vector-icons”: “^7.1.0”,

Author: Fantashit

1 thought on “How to add custom elements to TextInput left or right

  1. The same problem. ‘Right’ can render only TextInput.Icon or TextInput.Affix and nothing else. Looks like TextInputAdornment component deny that. Can it be fixed?

    “react-native”: “0.63.2”,
    “react-native-paper”: “4.3.1”,
    “react-native-vector-icons”: “^7.1.0”,

Comments are closed.