Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
fix(text-area): only set height when value changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric authored and varl committed Nov 25, 2019
1 parent abb790c commit 9ec7437
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class TextArea extends Component {
}
}

componentDidUpdate() {
if (this.shouldDoAutoGrow()) {
componentDidUpdate(prevProps) {
if (this.shouldDoAutoGrow() && this.props.value !== prevProps.value) {
this.setHeight()
}
}
Expand Down

0 comments on commit 9ec7437

Please sign in to comment.