mirror of
https://github.com/wu736139669/react-native-ASHTextView.git
synced 2026-08-05 06:24:36 +00:00
21 lines
563 B
JavaScript
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;
|