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
Этот коммит содержится в:
Mika Andrianarijaona
2017-01-19 00:00:21 +03:00
коммит произвёл enahum
родитель e15ae2253a
Коммит 9eb5727841
5 изменённых файлов: 40 добавлений и 3 удалений

Просмотреть файл

@@ -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) {