0
votes

import React from 'react'; import { TextInput, KeyboardAvoidingView, StyleSheet } from 'react-native';

import Colors from '../constants/Colors';

const QaTextInput = ({ style, minWidth, maxWidth, placeholder }) => { const input = { height: 35, minWidth: minWidth, maxWidth: maxWidth, borderWidth: 1, borderColor: Colors.input, backgroundColor: Colors.input };

return (
    <KeyboardAvoidingView
        behavior="position"
        keyboardVerticalOffset="100"
        enabled>
        <TextInput
            placeholder={placeholder}
            autoFocus={true}
            showSoftInputOnFocus={true}
            style={input}
        />
    </KeyboardAvoidingView>
);

};

export default QaTextInput;

1

1 Answers

0
votes

It was how I was using the component. One of the parents was a Text node. Changing that to a View solved it.