From 9eb57278413d4a4417e574f2bddb5bc0b2807d14 Mon Sep 17 00:00:00 2001 From: Mika Andrianarijaona Date: Thu, 19 Jan 2017 00:00:21 +0300 Subject: PLT-137: Disable upload button when max uploads reached (#5053) * Change upload button color opacity when max reached * Display max upload message * Remove error when deleting preview * Clear error message in side-bar when user reaches max upload and error is displayed in side-bar, removing one file won't remove error message * Scroll in preview after file upload in sidebar --- webapp/components/create_post.jsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'webapp/components/create_post.jsx') diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index e1b2ca059..9269633ff 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -297,6 +297,9 @@ export default class CreatePost extends React.Component { const fileInfos = Object.assign([], this.state.fileInfos); const uploadsInProgress = this.state.uploadsInProgress; + // Clear previous errors + this.handleUploadError(null); + // id can either be the id of an uploaded file or the client id of an in progress upload let index = fileInfos.findIndex((info) => info.id === id); if (index === -1) { -- cgit v1.2.3-1-g7c22