Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const renderField = ({ label, keyboardType, name, meta: { touched, error }, input: { onChange, ...restInput } }) => {
- this.state = {
- value: ''
- }
- return (
- <View style={{ flexDirection: 'column', height: 70, alignItems: 'flex-start' }}>
- <View style={{ flexDirection: 'row', alignItems: 'center', borderColor: 'black', borderBottomWidth: 1, }}>
- <TextInput style={{ height: 37, width: 295, paddingLeft: 10, fontSize: 20, height: 350, justifyContent: "flex-start" }}
- keyboardType={keyboardType} value={this.state.value} onChangeText={(value) => this.setState({ value })} {...restInput}
- placeholder={label} numberOfLines={10} multiline={true} maxLength={100}
- >
- </TextInput>
- </View>
- <Text>
- Characters Left: {this.state.value.length}/100
- </Text>
- {touched && ((error && <Text style={{ color: 'red', }}>{error}</Text>))}
- </View>);
- };
Add Comment
Please, Sign In to add comment