Skip to content

Commit bba2703

Browse files
Merge pull request mui#1875 from matsilva/issue/1870
[TextField] Fix issue/1870: Fix if newHeight is 0, use rowsHeight instead
2 parents d2b7807 + c3b23ff commit bba2703

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
@@ -138,6 +138,8 @@ const EnhancedTextarea = React.createClass({
138138
newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight);
139139
}
140140

141+
newHeight = Math.max(newHeight, rowsHeight);
142+
141143
if (this.state.height !== newHeight) {
142144
this.setState({
143145
height: newHeight,

0 commit comments

Comments
 (0)