Files
2018-10-30 18:10:09 +08:00

21 lines
563 B
JavaScript

import React, {Component} from 'react';
import {Platform, TextInput} from 'react-native';
class RNFixTextVieW extends Component {
shouldComponentUpdate(nextProps){
return Platform.OS !== 'ios' || (this.props.value === nextProps.value &&
(nextProps.defaultValue == undefined || nextProps.defaultValue == '' )) ||
(this.props.defaultValue === nextProps.defaultValue && (nextProps.value == undefined || nextProps.value == '' ));
}
render() {
return <TextInput {...this.props} />;
}
};
export default RNFixTextVieW;