Skip to content

Commit

Permalink
Merge pull request mui#1875 from matsilva/issue/1870
Browse files Browse the repository at this point in the history
[TextField] Fix issue/1870: Fix if newHeight is 0, use rowsHeight instead
  • Loading branch information
oliviertassinari committed Oct 21, 2015
2 parents d2b7807 + c3b23ff commit bba2703
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/enhanced-textarea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ const EnhancedTextarea = React.createClass({
newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight);
}

newHeight = Math.max(newHeight, rowsHeight);

if (this.state.height !== newHeight) {
this.setState({
height: newHeight,
Expand Down

0 comments on commit bba2703

Please sign in to comment.