Skip to content

Commit c3b23ff

Browse files
committed
issue/1870: Fix if newHeight is 0, use rowsHeight instead
1 parent 2b6c3f7 commit c3b23ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/enhanced-textarea.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ const EnhancedTextarea = React.createClass({
120120
newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight);
121121
}
122122

123+
newHeight = Math.max(newHeight, rowsHeight);
124+
123125
if (this.state.height !== newHeight) {
124126
this.setState({
125127
height: newHeight,

0 commit comments

Comments
 (0)