diff --git a/Examples/UIExplorer/js/TextInputExample.ios.js b/Examples/UIExplorer/js/TextInputExample.ios.js index f6499160448..960066872b2 100644 --- a/Examples/UIExplorer/js/TextInputExample.ios.js +++ b/Examples/UIExplorer/js/TextInputExample.ios.js @@ -103,34 +103,6 @@ class TextEventsExample extends React.Component { } } -class AutoExpandingTextInput extends React.Component { - state: any; - - constructor(props) { - super(props); - this.state = { - text: 'React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about — learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native.', - height: 0, - }; - } - render() { - return ( - { - this.setState({text}); - }} - onContentSizeChange={(event) => { - this.setState({height: event.nativeEvent.contentSize.height}); - }} - style={[styles.default, {height: Math.max(35, this.state.height)}]} - value={this.state.text} - /> - ); - } -} - class RewriteExample extends React.Component { state: any; @@ -403,6 +375,10 @@ var styles = StyleSheet.create({ padding: 4, marginBottom: 4, }, + multilineExpandable: { + height: 'auto', + maxHeight: 100, + }, multilineWithFontStyles: { color: 'blue', fontWeight: 'bold', @@ -801,10 +777,13 @@ exports.examples = [ render: function() { return ( - );