Only add Input auto-resize handler to multiline inputs

old
Ben Fox-Moore 2016-07-21 15:15:35 +02:00
parent 9c4a48597a
commit 9cc56e1937
1 changed files with 3 additions and 1 deletions

View File

@ -55,7 +55,9 @@ const factory = (FontIcon) => {
};
componentDidMount () {
window.addEventListener('resize', this.handleAutoresize);
if (this.props.multiline) {
window.addEventListener('resize', this.handleAutoresize);
}
}
componentWillReceiveProps (nextProps) {