From 9d94c07864a5717a479e1b87c38a24784e839dc3 Mon Sep 17 00:00:00 2001 From: nd0ut Date: Wed, 31 Jul 2024 15:25:26 +0300 Subject: [PATCH] fix(regular-mode): disable done button until group created --- blocks/UploadList/UploadList.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blocks/UploadList/UploadList.js b/blocks/UploadList/UploadList.js index 428785c0..7d4e0703 100644 --- a/blocks/UploadList/UploadList.js +++ b/blocks/UploadList/UploadList.js @@ -89,7 +89,8 @@ export class UploadList extends UploaderBlock { uploadBtnVisible = true; } else { allDone = true; - doneBtnEnabled = summary.total === summary.succeed && fitCountRestrictions && validationOk; + const groupOk = this.cfg.groupOutput ? !!collectionState.group : true; + doneBtnEnabled = summary.total === summary.succeed && fitCountRestrictions && validationOk && groupOk; } this.set$({ @@ -142,6 +143,11 @@ export class UploadList extends UploaderBlock { this.subConfigValue('multiple', this._throttledHandleCollectionUpdate); this.subConfigValue('multipleMin', this._throttledHandleCollectionUpdate); this.subConfigValue('multipleMax', this._throttledHandleCollectionUpdate); + this.sub('*groupInfo', (groupInfo) => { + if (groupInfo) { + this._throttledHandleCollectionUpdate(); + } + }); this.sub('*currentActivity', (currentActivity) => { if (!this.couldOpenActivity && currentActivity === this.activityType) {