FabioDev
FabioDev

Reputation: 744

Don't grey out Disabled TextInput in React Native Elements

I am trying to change the color of disabled React-native-elements component TextInput. Default behaviour is to grey out everything but I would like to have solid black color of the text even if it's disabled. Has anybody tips of how to do it?

Same question as Don't grey out Disabled Input in React Native Elements but for TextInput component.

TextInput don't have a disabledInputStyle prop.

Upvotes: 3

Views: 2906

Answers (1)

Rajan
Rajan

Reputation: 1568

You can use editable. It won't grey out it.

<View style={styles.app}>
    <TextInput
        style={{ height: 40, borderColor: "gray", borderWidth: 1 }}
        value={"values"}
        editable={false}
    />
</View>

enter image description here

Upvotes: 3

Related Questions