From 09ac6aa46d7112df581eade2777efd3b4ff8371f Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Tue, 8 Sep 2015 11:54:01 -0400
Subject: Resize create post control when file previews are added.

---
 web/react/components/create_post.jsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'web/react/components/create_post.jsx')

diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index 871b72a43..50aa0850d 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -55,6 +55,11 @@ export default class CreatePost extends React.Component {
             initialText: messageText
         };
     }
+    componentDidUpdate(prevProps, prevState) {
+        if (prevState.previews.length !== this.state.previews.length) {
+            this.resizePostHolder();
+        }
+    }
     handleSubmit(e) {
         e.preventDefault();
 
-- 
cgit v1.2.3-1-g7c22

