Skip to content

Commit f48516e

Browse files
committed
fix(social-source): toggle done button visibility along with selection status block
1 parent edb7f0d commit f48516e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/blocks/ExternalSource/ExternalSource.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export class ExternalSource extends UploaderBlock {
6262
couldSelectAll: false,
6363
couldDeselectAll: false,
6464
showSelectionStatus: false,
65-
showDoneBtn: false,
6665
counterText: '',
6766
doneBtnTextClass: 'uc-hidden',
6867
toolbarVisible: true,
@@ -192,10 +191,6 @@ export class ExternalSource extends UploaderBlock {
192191
couldDeselectAll: message.selectedCount === message.total,
193192
selectedList: message.selectedFiles,
194193
});
195-
196-
if (!this.$.showDoneBtn && message.isReady) {
197-
this.$.showDoneBtn = true;
198-
}
199194
}
200195

201196
private handleIframeLoad(): void {
@@ -290,7 +285,6 @@ export class ExternalSource extends UploaderBlock {
290285
couldSelectAll: false,
291286
couldDeselectAll: false,
292287
showSelectionStatus: false,
293-
showDoneBtn: false,
294288
});
295289
}
296290
}
@@ -318,7 +312,7 @@ ExternalSource.template = /* HTML */ `
318312
<button
319313
type="button"
320314
class="uc-done-btn uc-primary-btn"
321-
set="onclick: onDone; @disabled: !isDoneBtnEnabled; @hidden: !showDoneBtn"
315+
set="onclick: onDone; @disabled: !isDoneBtnEnabled; @hidden: !showSelectionStatus"
322316
>
323317
<uc-spinner set="@hidden: isSelectionReady"></uc-spinner>
324318
<span l10n="done" set="@class: doneBtnTextClass"></span>

0 commit comments

Comments
 (0)