Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React Native TextInput on iOS hides keyboard after one keystroke

$
0
0

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;


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>