react native textinput disable keyboard
<TouchableWithoutFeedback onPress={Keyboard.dismiss} >
<TextInput />
</TouchableWithoutFeedback> // 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>
Also in JavaScript:
- check if a class exists javascript
- interceptor in angular 8
- jquery datatable returning current datetime
- get text in select jquery
- how to delete the last part of a string in node js
- node js catch any errors
- tick.json code
- how to make back button react
- how to add objects in array in javascript
- js selection box excel node
- js check if attribute exists
- how to clear radio field in jquery
- js ternary if else
- script src= https//kit.fontawesome.com/a81368914c.js /script
- express database
- AJAX JAVASCRIPT TUTORIALS
- javascript filter array remove duplicates
- drupal twig node alias
- react arrays
- ISS proxy express
- destruction in javascript
- let in javascript
- popper.min.js:4 Uncaught SyntaxError: Unexpected token 'export'
- how to install node js in ubuntu