Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 060efc2

Browse files
committed
small refactor
1 parent 8c2fdc7 commit 060efc2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/packages/documents/documents/modals/schedule-modal/document-schedule-modal.element.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export class UmbDocumentScheduleModalElement extends UmbModalBaseElement<
2121
@state()
2222
_selection: UmbDocumentScheduleModalValue['selection'] = [];
2323

24+
@state()
25+
_isAllSelected?: boolean;
26+
2427
constructor() {
2528
super();
2629
this.observe(
@@ -29,6 +32,7 @@ export class UmbDocumentScheduleModalElement extends UmbModalBaseElement<
2932
this._selection = selection.map((unique) => {
3033
return { unique, schedule: {} };
3134
});
35+
this._isAllSelected = this.#isAllSelected();
3236
},
3337
'_selection',
3438
);
@@ -132,7 +136,7 @@ export class UmbDocumentScheduleModalElement extends UmbModalBaseElement<
132136
<uui-checkbox
133137
@change=${this.#onSelectAllChange}
134138
label=${this.localize.term('general_selectAll')}
135-
.checked=${this.#isAllSelected()}></uui-checkbox>
139+
.checked=${this._isAllSelected}></uui-checkbox>
136140
137141
${repeat(
138142
this._options,

src/packages/documents/documents/modals/shared/document-variant-language-picker.element.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export class UmbDocumentVariantLanguagePickerElement extends UmbLitElement {
2828
this.selectionManager.selection,
2929
(selection) => {
3030
this._selection = selection;
31+
this._isAllSelected = this.#isAllSelected();
3132
},
3233
'_selectionManager',
3334
);
@@ -39,6 +40,9 @@ export class UmbDocumentVariantLanguagePickerElement extends UmbLitElement {
3940
@state()
4041
_selection: Array<string> = [];
4142

43+
@state()
44+
_isAllSelected?: boolean;
45+
4246
/**
4347
* A filter function that determines if an item is pickableFilter or not.
4448
* @memberof UmbDocumentVariantLanguagePickerElement
@@ -96,7 +100,7 @@ export class UmbDocumentVariantLanguagePickerElement extends UmbLitElement {
96100
<uui-checkbox
97101
@change=${this.#onSelectAllChange}
98102
label=${this.localize.term('general_selectAll')}
99-
.checked=${this.#isAllSelected()}></uui-checkbox>
103+
.checked=${this._isAllSelected}></uui-checkbox>
100104
${repeat(
101105
this.variantLanguageOptions,
102106
(option) => option.unique,

0 commit comments

Comments
 (0)