Skip to content

Commit

Permalink
issue/1870: Fix if newHeight is 0, use rowsHeight instead
Browse files Browse the repository at this point in the history
  • Loading branch information
matsilva committed Oct 14, 2015
1 parent 2b6c3f7 commit c3b23ff
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 @@ -120,6 +120,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 c3b23ff

Please sign in to comment.