mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-25 14:22:14 +03:00
Fixed android paste issue
This commit is contained in:
parent
2a615a519b
commit
b4d50b20e7
@ -19,14 +19,15 @@ export default EStyleSheet.create({
|
||||
marginLeft: 12,
|
||||
},
|
||||
textInput: {
|
||||
height: 60,
|
||||
flex: 0.7,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
icon: {
|
||||
flex: 0.15,
|
||||
fontSize: 25,
|
||||
top: 18,
|
||||
left: 8,
|
||||
color:"$iconColor",
|
||||
color: '$iconColor',
|
||||
},
|
||||
});
|
||||
|
@ -30,10 +30,17 @@ class FormInputView extends Component {
|
||||
value: '',
|
||||
inputBorderColor: '#c1c5c7',
|
||||
isValid: true,
|
||||
formInputWidth: '99%',
|
||||
};
|
||||
}
|
||||
|
||||
// Component Life Cycles
|
||||
componentWillMount() {
|
||||
setTimeout(() => {
|
||||
this.setState({ formInputWidth: '100%' });
|
||||
}, 100);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { isValid } = this.props;
|
||||
|
||||
@ -58,7 +65,9 @@ class FormInputView extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { inputBorderColor, isValid, value } = this.state;
|
||||
const {
|
||||
inputBorderColor, isValid, value, formInputWidth,
|
||||
} = this.state;
|
||||
const {
|
||||
placeholder,
|
||||
type,
|
||||
@ -68,7 +77,6 @@ class FormInputView extends Component {
|
||||
rightIconName,
|
||||
secureTextEntry,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<View
|
||||
style={[
|
||||
@ -92,6 +100,7 @@ class FormInputView extends Component {
|
||||
) : (
|
||||
<Ionicons name={rightIconName} style={styles.icon} />
|
||||
)}
|
||||
<View style={styles.textInput}>
|
||||
<TextInput
|
||||
onFocus={() => this._handleOnFocus()}
|
||||
autoCapitalize="none"
|
||||
@ -101,8 +110,10 @@ class FormInputView extends Component {
|
||||
textContentType={type}
|
||||
onChangeText={val => this._handleOnChange(val)}
|
||||
value={value}
|
||||
style={styles.textInput}
|
||||
style={{ width: formInputWidth }}
|
||||
/>
|
||||
</View>
|
||||
|
||||
{value && value.length > 0 ? (
|
||||
<Ionicons
|
||||
onPress={() => this.setState({ value: '' })}
|
||||
|
Loading…
Reference in New Issue
Block a user