diff --git a/web/app/components/input/input.jsx b/web/app/components/input/input.jsx index 21b7d308..f47b5fca 100644 --- a/web/app/components/input/input.jsx +++ b/web/app/components/input/input.jsx @@ -38,10 +38,9 @@ export default class Input extends Component { autoResize() { this.fieldNode.style.height = ''; - this.setState({ - height: this.fieldNode.scrollHeight, - preview: null, - }); + this.fieldNode.style.height = `${this.fieldNode.scrollHeight}px`; + + this.setState({ preview: null }); } send(e) { @@ -62,7 +61,8 @@ export default class Input extends Component { } this.fieldNode.value = ''; - this.setState({ height: null, preview: null }); + this.fieldNode.style.height = ''; + this.setState({ preview: null }); }) .catch(() => { // TODO: do smth? @@ -82,7 +82,7 @@ export default class Input extends Component { }); } - render(props, { height, isFieldDisabled, preview }) { + render(props, { isFieldDisabled, preview }) { return (