“React Native TextInput Désactiver le clavier” Réponses codées

TextInput Disable React Native

<TextInput editable={false} selectTextOnFocus={false} />
Adventurous Addax

react natif désactiver l'entrée de texte

<TextInput editable={false} />
amit.bhagat

React Native TextInput Aucun clavier

<TouchableWithoutFeedback onPress={Keyboard.dismiss} >
    <TextInput />
</TouchableWithoutFeedback>
Friendly Finch

React Native TextInput Désactiver le clavier

<Text>

</Text>
development development

React Native TextInput Désactiver le clavier

            // Step 1: Get Keyboard, TouchableWithoutFeedback from ‘react-native’;
            import { View, TextInput, StyleSheet, Keyboard,  TouchableWithoutFeedback } from 'react-native';

            // Step 2: Create an arrow function to write dismiss keyboard code
            const DismissKeyboard = ({ children }) => (
                <TouchableWithoutFeedback onPress={() => Keyboard.dismiss()}>
                    {children}
                </TouchableWithoutFeedback>
                );

            // Step 3: Wrap all TextInput inside <DismissKeyboard> </DismissKeyboard>
            //Example
            <DismissKeyboard>
                <View style={styles.container}>
                    <TextInput style={styles.input} placeholder="email" />
                    <TextInput style={styles.input} placeholder="password" />
                </View>
            </DismissKeyboard>
Dead Dotterel

Réponses similaires à “React Native TextInput Désactiver le clavier”

Questions similaires à “React Native TextInput Désactiver le clavier”

Plus de réponses similaires à “React Native TextInput Désactiver le clavier” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code