Automatically change the size of textarea (#2128)

This commit is contained in:
geta6 authored and Eugen committed 2017-04-19 15:39:46 +02:00
1 parent a8e1afc30a
commit 15a4fc5dcc
2 files changed
+11 -2

No files matched your search

@@ -63,6 +63,10 @@ const AutosuggestTextarea = React.createClass({
this.props.onSuggestionsClearRequested();
}
// auto-resize textarea
e.target.style.height = 'auto';
e.target.style.height = `${e.target.scrollHeight}px`;
this.props.onChange(e);
},