react-native-auto-grow-textinput
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "react-native-auto-grow-textinput", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "This component allows to create auto grow text input for both platforms (iOS and Android).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,2 +10,3 @@ // @flow | ||
} from 'react-native'; | ||
import _ from 'lodash'; | ||
@@ -45,3 +46,14 @@ type Props = { | ||
render() { | ||
const newProps = Object.assign({}, this.props); | ||
const newProps = _.omit({ | ||
...this.props, | ||
...Platform.select({ | ||
ios: { | ||
onContentSizeChange: this._onContentSizeChange, | ||
}, | ||
android: { | ||
onChange: this._onContentSizeChange | ||
}, | ||
}), | ||
}, [ 'style', 'maxLines' ]); | ||
const externalStyle = this.props.style; | ||
@@ -52,5 +64,2 @@ const textInputStyle = { | ||
delete newProps['style']; | ||
delete newProps['maxLines']; | ||
return ( | ||
@@ -61,3 +70,2 @@ <TextInput | ||
underlineColorAndroid='transparent' | ||
onContentSizeChange={ this._onContentSizeChange } | ||
style={[ externalStyle, textInputStyle ]} | ||
@@ -64,0 +72,0 @@ /> |
15111
74