diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-08 14:29:28 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-08 14:29:28 -0400 |
commit | 64d4890a4109618b383f7cfe1acc541bd72a0899 (patch) | |
tree | 2d0b6dd4f5b1df9442b8dbafa4cc97cc1fa1f778 /web/react/components | |
parent | 05eb81638dba882b289ee39a34c6bc75e9f0941d (diff) | |
parent | 09ac6aa46d7112df581eade2777efd3b4ff8371f (diff) | |
download | chat-64d4890a4109618b383f7cfe1acc541bd72a0899.tar.gz chat-64d4890a4109618b383f7cfe1acc541bd72a0899.tar.bz2 chat-64d4890a4109618b383f7cfe1acc541bd72a0899.zip |
Merge pull request #626 from mattermost/mm-2125
MM-2125 Resize create post control when file previews are added.
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/create_post.jsx | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |