Fix layout issues on Android
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { TextInput, Text, View } from "react-native"
|
||||
import { TextInput, Text, View, Platform } from "react-native"
|
||||
import autobind from "autobind-decorator"
|
||||
|
||||
export class BoundInput extends React.Component {
|
||||
@@ -42,7 +42,7 @@ export class BoundInput extends React.Component {
|
||||
|
||||
render() {
|
||||
const { label, password, name, placeholder, message, lines } = this.props
|
||||
const { visible, disabled, value, valid } = this.state
|
||||
const { visible, disabled, readOnly, value, valid } = this.state
|
||||
|
||||
if (!visible) {
|
||||
return null
|
||||
@@ -62,11 +62,12 @@ export class BoundInput extends React.Component {
|
||||
borderWidth: 1,
|
||||
fontSize: 16,
|
||||
paddingTop: 7,
|
||||
paddingBottom: 7,
|
||||
paddingBottom: Platform.OS === "ios" ? 7 : 0,
|
||||
textAlignVertical: "top",
|
||||
}}
|
||||
multiline={lines > 1}
|
||||
numberOfLines={lines}
|
||||
editable={!disabled}
|
||||
editable={!disabled && !readOnly}
|
||||
autoCapitalize="none"
|
||||
underlineColorAndroid="white"
|
||||
value={value}
|
||||
|
||||
Reference in New Issue
Block a user