Adds padding between keyboard and text input
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, TextInput } from 'react-native'
|
||||
import { KeyboardAvoidingView, StyleSheet, TextInput } from 'react-native'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import { Colors, Spacing, Typography } from '../../styles'
|
||||
|
||||
const AppTextInput = ({ style, ...props }) => {
|
||||
return <TextInput style={[styles.input, style]} {...props} />
|
||||
return (
|
||||
<KeyboardAvoidingView
|
||||
behavior="padding"
|
||||
keyboardVerticalOffset={250}
|
||||
>
|
||||
<TextInput style={[styles.input, style]} {...props} />
|
||||
</KeyboardAvoidingView>
|
||||
)
|
||||
}
|
||||
|
||||
AppTextInput.propTypes = {
|
||||
|
||||
@@ -215,10 +215,11 @@ class SymptomEditView extends Component {
|
||||
<AppText>{symtomPage[symptom].note}</AppText>
|
||||
<AppTextInput
|
||||
multiline={true}
|
||||
placeholder={sharedLabels.enter}
|
||||
numberOfLines={3}
|
||||
onChangeText={this.onEditNote}
|
||||
value={noteText !== null ? noteText : ''}
|
||||
placeholder={sharedLabels.enter}
|
||||
testID='noteInput'
|
||||
value={noteText !== null ? noteText : ''}
|
||||
/>
|
||||
</Segment>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user